Repository navigation
58 lines (49 loc) · 1.72 KB
/
Copy pathrelease.yml
File metadata and controls
58 lines (49 loc) · 1.72 KB
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: Release
on:
release:
types: [published]
permissions:
contents: write
id-token: write
attestations: write
jobs:
build:
uses: ./.github/workflows/build.yml
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: NextClient-${{ github.sha }}
path: dist/nextclient
- name: Download PDB artifact
uses: actions/download-artifact@v4
with:
name: NextClient-pdb-${{ github.sha }}
path: dist/pdb
- name: Download Linux build artifact
uses: actions/download-artifact@v4
with:
name: NextClient-linux-${{ github.sha }}
path: dist/linux
- name: Package release archives
env:
TAG: ${{ github.event.release.tag_name }}
run: |
(cd dist/nextclient && zip -r "$GITHUB_WORKSPACE/NextClient-$TAG.zip" .)
(cd dist/pdb && zip -r "$GITHUB_WORKSPACE/NextClient-$TAG-pdb.zip" .)
mv dist/linux/NextClient-linux.tar.gz "NextClient-$TAG-linux.tar.gz"
- name: Attest build provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: |
NextClient-${{ github.event.release.tag_name }}.zip
NextClient-${{ github.event.release.tag_name }}-pdb.zip
NextClient-${{ github.event.release.tag_name }}-linux.tar.gz
- name: Upload assets to release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" "NextClient-$TAG.zip" "NextClient-$TAG-pdb.zip" "NextClient-$TAG-linux.tar.gz" --clobber --repo "$GITHUB_REPOSITORY"