mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
update release ci
This commit is contained in:
parent
eb6394b2ea
commit
7121474198
1 changed files with 22 additions and 6 deletions
|
|
@ -1,16 +1,30 @@
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
tags: ["*"]
|
types: [published]
|
||||||
|
|
||||||
permissions:
|
enable-openid-connect: true
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: nix
|
runs-on: nix
|
||||||
steps:
|
steps:
|
||||||
|
- name: fetch jwt
|
||||||
|
id: jwt
|
||||||
|
env:
|
||||||
|
AUD: u:168061:141d46eb-9b70-4c27-9d49-db5b30b6da28
|
||||||
|
run: |
|
||||||
|
jwt=$( \
|
||||||
|
curl --fail \
|
||||||
|
-H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
|
||||||
|
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$AUD" \
|
||||||
|
| jq -r ".value" \
|
||||||
|
)
|
||||||
|
# ::add-mask:: tells Forgejo Runner that the JWT
|
||||||
|
# is a secret which should be masked in the logs.
|
||||||
|
echo "::add-mask::$jwt"
|
||||||
|
echo "jwt=$jwt" >> $FORGEJO_OUTPUT
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||||
with:
|
with:
|
||||||
|
|
@ -24,8 +38,10 @@ jobs:
|
||||||
cp result/bin/haze assets/$asset
|
cp result/bin/haze assets/$asset
|
||||||
done
|
done
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: https://code.forgejo.org/actions/forgejo-release@v2.7.3
|
# https://code.forgejo.org/actions/forgejo-release/issues/121
|
||||||
|
uses: https://code.forgejo.org/astrelion/forgejo-release@b523d26318949212b87ef4a5a19a5ee9218d0c20
|
||||||
with:
|
with:
|
||||||
direction: upload
|
direction: upload
|
||||||
release-dir: assets
|
release-dir: assets
|
||||||
token: "${{ secrets.FORGEJO_TOKEN }}"
|
only-assets: true
|
||||||
|
token: "${{ steps.jwt.outputs.jwt }}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue