-
-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (49 loc) · 1.45 KB
/
inox-dev.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
55
56
57
58
name: Inox dev
on:
push:
branches:
- 'ci-tinkering'
# never add another branch because this would update the dev release
paths-ignore:
- 'docs/**'
- '.legal/**'
- '**/*.md'
- 'jsconfig.json'
permissions: write-all
jobs:
cleanup-prev-dev-assets:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Delete old release assets
uses: GraphR00t/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: dev
fail-if-no-assets: false
assets: "*"
release-dev-linux-amd64:
name: release dev linux/amd64
needs: cleanup-prev-dev-assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# By default, caching is enabled when using the setup-go action.
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'
- name: Install dependencies
run: go mod download
- name: Check Event
run: bash -eux ./scripts/ci/check_github_event.sh
- name: Build Binary
run: GOOS=linux GOARCH=amd64 go build ./cmd/inox
- name: Update Assets
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: >
BINARY_ASSET_NAME=inox-linux-amd64.tar.gz CHECKSUM_ASSET_NAME=inox-linux-amd64.tar.gz.sha256
bash -eux ./scripts/ci/update_assets.sh