-
Notifications
You must be signed in to change notification settings - Fork 20
44 lines (42 loc) · 1.25 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
name:
Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.20"
- 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: 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