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