Remove Web, and enable releases
This commit is contained in:
+15
-21
@@ -4,8 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- "**"
|
||||||
tags-ignore:
|
tags:
|
||||||
- "**"
|
- "!**"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -84,19 +84,22 @@ jobs:
|
|||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|
||||||
- name: Create release
|
- name: Create tag + release
|
||||||
id: create_release
|
id: create_release
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
|
||||||
|
TAG="build-${SHORT_SHA}"
|
||||||
|
|
||||||
RESPONSE=$(curl -s -X POST \
|
RESPONSE=$(curl -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.LIBSM64_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.LIBSM64_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"https://git.nepu.men/api/v1/repos/NepuShiro/libsm64/releases" \
|
"https://git.nepu.men/api/v1/repos/NepuShiro/libsm64/releases" \
|
||||||
-d '{
|
-d "{
|
||||||
"tag_name": "latest",
|
\"tag_name\": \"${TAG}\",
|
||||||
"name": "Snapshot Build",
|
\"name\": \"Snapshot Build ${SHORT_SHA}\",
|
||||||
"prerelease": true
|
\"prerelease\": true
|
||||||
}')
|
}")
|
||||||
|
|
||||||
echo "$RESPONSE"
|
echo "$RESPONSE"
|
||||||
|
|
||||||
@@ -108,22 +111,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token ${{ secrets.LIBSM64_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.LIBSM64_TOKEN }}" \
|
||||||
-F "attachment=@libsm64_linux/run-test" \
|
-F "attachment=@libsm64_linux" \
|
||||||
"https://git.nepu.men/api/v1/repos/NepuShiro/libsm64/releases/${{ steps.create_release.outputs.release_id }}/assets?name=run-test-linux"
|
"https://git.nepu.men/api/v1/repos/NepuShiro/libsm64/releases/${{ steps.create_release.outputs.release_id }}/assets?name=libsm64_linux.zip
|
||||||
|
|
||||||
- name: Upload Windows artifact
|
- name: Upload Windows artifact
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
tar -czf windows.tar.gz libsm64_windows
|
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token ${{ secrets.LIBSM64_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.LIBSM64_TOKEN }}" \
|
||||||
-F "attachment=@windows.tar.gz" \
|
-F "attachment=@libsm64_windows" \
|
||||||
"https://git.nepu.men/api/v1/repos/NepuShiro/libsm64/releases/${{ steps.create_release.outputs.release_id }}/assets?name=libsm64-windows.tar.gz"
|
"https://git.nepu.men/api/v1/repos/NepuShiro/libsm64/releases/${{ steps.create_release.outputs.release_id }}/assets?name=libsm64_windows.zip
|
||||||
|
|
||||||
- name: Upload README
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
curl -X POST \
|
|
||||||
-H "Authorization: token ${{ secrets.LIBSM64_TOKEN }}" \
|
|
||||||
-F "attachment=@README.md" \
|
|
||||||
"https://git.nepu.men/api/v1/repos/NepuShiro/libsm64/releases/${{ steps.create_release.outputs.release_id }}/assets?name=README.md"
|
|
||||||
Reference in New Issue
Block a user