Try again
This commit is contained in:
61
.github/workflows/release.yml
vendored
61
.github/workflows/release.yml
vendored
@@ -1,43 +1,28 @@
|
||||
name: Release Workflow
|
||||
workflow "Release":
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*' # Only trigger on version tags like 1.2.3
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Run deploy script
|
||||
run: bash deploy.sh
|
||||
commands:
|
||||
- name: Run deploy.sh
|
||||
shell: bash
|
||||
command: ./deploy.sh
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
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
|
||||
shell: bash
|
||||
command: |
|
||||
curl -X POST -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" \
|
||||
-d '{"tag_name": "${GITEA_TAG_NAME}", "name": "${GITEA_TAG_NAME}", "draft": false, "prerelease": false}' \
|
||||
"https://git.site.quack-lab.dev/api/v1/repos/${GITEA_REPOSITORY}/releases"
|
||||
|
||||
- name: Upload Release Asset
|
||||
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
|
||||
- name: Upload Asset
|
||||
shell: bash
|
||||
command: |
|
||||
curl -X POST -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/zip" \
|
||||
-H "Content-Length: $(wc -c < Heimdall.zip)" \
|
||||
-T Heimdall.zip \
|
||||
"https://git.site.quack-lab.dev/api/v1/repos/${GITEA_REPOSITORY}/releases/${GITEA_RELEASE_ID}/assets"
|
||||
Reference in New Issue
Block a user