Attempt #23458
This commit is contained in:
62
.github/workflows/release.yml
vendored
62
.github/workflows/release.yml
vendored
@@ -1,28 +1,42 @@
|
|||||||
workflow "Release":
|
name: Release
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*.*.*'
|
|
||||||
|
|
||||||
env:
|
on:
|
||||||
GITEA_TOKEN: ${{ secrets.JEBENI_MRTVI_TOKEN_JEBENI }}
|
push:
|
||||||
|
tags:
|
||||||
|
- '*.*.*'
|
||||||
|
|
||||||
commands:
|
jobs:
|
||||||
- name: Run deploy.sh
|
build-and-release:
|
||||||
shell: bash
|
runs-on: ubuntu-latest
|
||||||
command: ./deploy.sh
|
|
||||||
|
|
||||||
- name: Create Release
|
steps:
|
||||||
shell: bash
|
- name: Checkout code
|
||||||
command: |
|
uses: actions/checkout@v3
|
||||||
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 Asset
|
- name: Run deploy.sh
|
||||||
shell: bash
|
run: |
|
||||||
command: |
|
chmod +x deploy.sh
|
||||||
curl -X POST -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/zip" \
|
./deploy.sh
|
||||||
-H "Content-Length: $(wc -c < Heimdall.zip)" \
|
|
||||||
-T Heimdall.zip \
|
- name: Create Release and Upload Asset
|
||||||
"https://git.site.quack-lab.dev/api/v1/repos/${GITEA_REPOSITORY}/releases/${GITEA_RELEASE_ID}/assets"
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.JEBENI_MRTVI_TOKEN_JEBENI }}
|
||||||
|
run: |
|
||||||
|
TAG_NAME=${GITEA_REF##*/}
|
||||||
|
|
||||||
|
RELEASE_ID=$(curl -s -X POST \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-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')
|
||||||
|
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/zip" \
|
||||||
|
--data-binary @Heimdall.zip \
|
||||||
|
"https://git.site.quack-lab.dev/api/v1/repos/$GITEA_REPOSITORY/releases/$RELEASE_ID/assets?name=Heimdall.zip"
|
Reference in New Issue
Block a user