-
Notifications
You must be signed in to change notification settings - Fork 39
49 lines (39 loc) · 1.18 KB
/
build-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
---
name: Build release
on: # yamllint disable-line rule:truthy
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
name: Build release
runs-on: [ubuntu-latest]
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/checkout@v4
with:
token: ${{ secrets.SAMLTRACER_BUILD_TOKEN }}
ref: ${{ github.head_ref || github.ref_name }}
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Fetch changes
# Without fetching, we might miss new tags due to caching in Github Actions
run: git fetch --all
- name: Run build-script
run: bin/build.sh
# Store the version, stripping any v-prefix
- name: Write release version
run: |
TAG="${{ github.ref_name }}"
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: Save release
uses: actions/upload-artifact@v4
with:
name: release
path: "/tmp/samltracer.zip"
retention-days: 1
- name: Calculate SHA checksum
run: sha256sum "/tmp/samltracer.zip"