-
Notifications
You must be signed in to change notification settings - Fork 21
54 lines (51 loc) · 1.57 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name:
Release
on:
release:
types: [published]
permissions:
attestations: write
contents: write
id-token: write # required for attestation
jobs:
build:
# Do not use latest, because we don't want to link against too new a glibc.
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.23"
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"
cache-dependency-path: |
web/martian/yarn.lock
- name: build
run: make tarball
- name: compute tarball prefix
run: |
echo TARBALL_PREFIX=martian-${{ github.event.release.tag_name }}-$(uname -is | tr "A-Z " "a-z-").tar >> $GITHUB_ENV
- name: Attest Build Provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: "${{ env.TARBALL_PREFIX }}.*"
- name: upload xz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ env.TARBALL_PREFIX }}.xz
asset_name: ${{ env.TARBALL_PREFIX }}.xz
asset_content_type: application/x-gtar
- name: upload gzip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ env.TARBALL_PREFIX }}.gz
asset_name: ${{ env.TARBALL_PREFIX }}.gz
asset_content_type: application/x-gtar