Add release
This commit is contained in:
45
.github/workflows/release.yml
vendored
45
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Release
|
name: Release Workflow
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -6,39 +6,38 @@ on:
|
|||||||
- '*.*.*'
|
- '*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Run deploy.sh
|
- name: Run deploy script
|
||||||
|
run: bash deploy.sh
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
run: |
|
run: |
|
||||||
chmod +x deploy.sh
|
curl -X POST \
|
||||||
./deploy.sh
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
|
-H "Accept: application/json" \
|
||||||
- name: Create Release and Upload Asset
|
|
||||||
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" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"tag_name": "'"$TAG_NAME"'",
|
"tag_name": "${{ github.ref_name }}",
|
||||||
"name": "'"$TAG_NAME"'",
|
"name": "${{ github.ref_name }}",
|
||||||
"draft": false,
|
"draft": false,
|
||||||
"prerelease": false
|
"prerelease": false
|
||||||
}' \
|
}' \
|
||||||
"https://git.site.quack-lab.dev/api/v1/repos/$GITEA_REPOSITORY/releases" | jq -r '.id')
|
https://git.site.quack-lab.dev/api/v1/repos/dave/Heimdall/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 \
|
curl -X POST \
|
||||||
-H "Authorization: token $GITEA_TOKEN" \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Content-Type: application/zip" \
|
-H "Content-Type: application/zip" \
|
||||||
--data-binary @Heimdall.zip \
|
--data-binary @Heimdall.zip \
|
||||||
"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/dave/Heimdall/releases/${RELEASE_ID}/assets
|
||||||
|
|
||||||
#PLEASE RUN
|
|
||||||
|
Reference in New Issue
Block a user