This commit is contained in:
parent
cb1175a5d1
commit
6ad3ac8743
1 changed files with 21 additions and 7 deletions
|
|
@ -30,14 +30,28 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp dist/TinyWeb TinyWeb-linux-x64
|
cp dist/TinyWeb TinyWeb-linux-x64
|
||||||
chmod +x TinyWeb-linux-x64
|
chmod +x TinyWeb-linux-x64
|
||||||
|
ls -la TinyWeb-linux-x64
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
uses: https://code.forgejo.org/actions/forgejo-release@v2
|
run: |
|
||||||
with:
|
TAG="${{ github.ref_name }}"
|
||||||
direction: upload
|
REPO="${{ github.repository }}"
|
||||||
release-dir: .
|
TOKEN="${{ secrets.FORGEJO_TOKEN }}"
|
||||||
override: true
|
# Try to create release (ignore error if exists)
|
||||||
env:
|
curl -X POST "https://git.derickphan.com/api/v1/repos/$REPO/releases" \
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
-H "Authorization: token $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\"}" || true
|
||||||
|
|
||||||
|
- name: Upload to Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: |
|
||||||
|
FILE=TinyWeb-linux-x64
|
||||||
|
TAG="${{ github.ref_name }}"
|
||||||
|
REPO="${{ github.repository }}"
|
||||||
|
TOKEN="${{ secrets.FORGEJO_TOKEN }}"
|
||||||
|
curl -X POST "https://git.derickphan.com/api/v1/repos/$REPO/releases/$TAG/assets" \
|
||||||
|
-H "Authorization: token $TOKEN" \
|
||||||
|
-F "attachment=@$FILE"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue