Maybe fix workflow?
This commit is contained in:
44
.github/workflows/release.yml
vendored
44
.github/workflows/release.yml
vendored
@@ -3,31 +3,41 @@ name: Release Workflow
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
- '*.*.*' # Only trigger on version tags like 1.2.3
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
||||
- name: Run deploy script
|
||||
run: bash deploy.sh
|
||||
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
release_name: ${{ github.ref_name }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"tag_name": "${{ github.ref_name }}",
|
||||
"name": "${{ github.ref_name }}",
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}' \
|
||||
https://git.site.quack-lab.dev/api/v1/repos/dave/Heimdall/releases
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: Heimdall.zip
|
||||
asset_name: Heimdall.zip
|
||||
asset_content_type: application/zip
|
||||
run: |
|
||||
RELEASE_ID=$(curl -s \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
https://git.site.quack-lab.dev/api/v1/repos/dave/Heimdall/releases/tags/${{ github.ref_name }} | jq -r '.id')
|
||||
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary @Heimdall.zip \
|
||||
https://git.site.quack-lab.dev/api/v1/repos/dave/Heimdall/releases/${RELEASE_ID}/assets
|
||||
|
||||
Reference in New Issue
Block a user