-
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (44 loc) · 1.18 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
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Release
on:
push:
tags: ["v*.*.*"]
jobs:
build:
permissions:
id-token: write
attestations: write
uses: ./.github/workflows/build.yml
github:
name: GitHub Releases
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifacts
id: download
uses: actions/download-artifact@v4
with:
path: /tmp/artifacts
- name: Prepare assets
env:
ARTIFACTS: ${{ steps.download.outputs.download-path }}
id: prepare
run: |
asset_path="/tmp/assets"
mkdir -p "$asset_path"
for artifact in "$ARTIFACTS"/*/; do
basename "$artifact" | \
xargs -I {} zip -jr "$asset_path"/{}.zip "$artifact"
done
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
gh release create --draft --verify-tag "$TAG" /tmp/assets/*.zip