This commit is contained in:
2025-01-10 21:13:35 +01:00
parent 604371a2e1
commit f52ed8c791

View File

@@ -1,28 +1,42 @@
workflow "Release": name: Release
on:
on:
push: push:
tags: tags:
- '*.*.*' - '*.*.*'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run deploy.sh
run: |
chmod +x deploy.sh
./deploy.sh
- name: Create Release and Upload Asset
env: env:
GITEA_TOKEN: ${{ secrets.JEBENI_MRTVI_TOKEN_JEBENI }} GITEA_TOKEN: ${{ secrets.JEBENI_MRTVI_TOKEN_JEBENI }}
run: |
TAG_NAME=${GITEA_REF##*/}
commands: RELEASE_ID=$(curl -s -X POST \
- name: Run deploy.sh -H "Authorization: token $GITEA_TOKEN" \
shell: bash -H "Content-Type: application/json" \
command: ./deploy.sh -d '{
"tag_name": "'"$TAG_NAME"'",
"name": "'"$TAG_NAME"'",
"draft": false,
"prerelease": false
}' \
"https://git.site.quack-lab.dev/api/v1/repos/$GITEA_REPOSITORY/releases" | jq -r '.id')
- name: Create Release curl -X POST \
shell: bash -H "Authorization: token $GITEA_TOKEN" \
command: | -H "Content-Type: application/zip" \
curl -X POST -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" \ --data-binary @Heimdall.zip \
-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/$RELEASE_ID/assets?name=Heimdall.zip"
"https://git.site.quack-lab.dev/api/v1/repos/${GITEA_REPOSITORY}/releases"
- 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"