Compare commits
5 Commits
3aa792a620
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 95deda1f59 | |||
| 3f3d1e1e5d | |||
| 877b8e9a04 | |||
| 4ce59f537c | |||
| 7d13bde13b |
@@ -10,11 +10,12 @@ jobs:
|
|||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 1. Checkout repository
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # fetch full history
|
||||||
|
tags: true # fetch all tags
|
||||||
|
|
||||||
# 2. Read VERSION file and check if tag exists
|
|
||||||
- name: Check/Create Tag
|
- name: Check/Create Tag
|
||||||
id: tag
|
id: tag
|
||||||
run: |
|
run: |
|
||||||
@@ -33,7 +34,6 @@ jobs:
|
|||||||
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# 3. Build artifacts (only runs if tag did not exist)
|
|
||||||
- name: Build Artifacts
|
- name: Build Artifacts
|
||||||
if: steps.tag.outputs.version
|
if: steps.tag.outputs.version
|
||||||
run: |
|
run: |
|
||||||
@@ -41,7 +41,6 @@ jobs:
|
|||||||
./package
|
./package
|
||||||
ls -l dist/
|
ls -l dist/
|
||||||
|
|
||||||
# 4. Create release
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: steps.tag.outputs.version
|
if: steps.tag.outputs.version
|
||||||
id: create_release
|
id: create_release
|
||||||
@@ -63,7 +62,6 @@ jobs:
|
|||||||
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
||||||
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
|
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# 5. Upload artifacts
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
if: steps.tag.outputs.version
|
if: steps.tag.outputs.version
|
||||||
run: |
|
run: |
|
||||||
@@ -78,7 +76,6 @@ jobs:
|
|||||||
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases/$RELEASE_ID/assets?name=$FILENAME"
|
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases/$RELEASE_ID/assets?name=$FILENAME"
|
||||||
done
|
done
|
||||||
|
|
||||||
# 6. Cleanup artifacts
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
if: steps.tag.outputs.version
|
if: steps.tag.outputs.version
|
||||||
run: rm -rf dist/*
|
run: rm -rf dist/*
|
||||||
|
|||||||
Reference in New Issue
Block a user