Remove Web, and enable releases
This commit is contained in:
+33
-30
@@ -37,6 +37,12 @@ jobs:
|
|||||||
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
|
||||||
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
||||||
|
|
||||||
|
- name: (Windows) Prepare cross compilation
|
||||||
|
if: ${{ startsWith(matrix.identifier, 'windows') }}
|
||||||
|
shell: sh
|
||||||
|
run: |
|
||||||
|
echo "OS=Windows_NT" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: (Linux) Install dependencies
|
- name: (Linux) Install dependencies
|
||||||
if: matrix.identifier == 'linux'
|
if: matrix.identifier == 'linux'
|
||||||
run: |
|
run: |
|
||||||
@@ -65,7 +71,7 @@ jobs:
|
|||||||
cp README.md artifacts/${{ matrix.identifier }}/
|
cp README.md artifacts/${{ matrix.identifier }}/
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: libsm64_${{ matrix.identifier }}
|
name: libsm64_${{ matrix.identifier }}
|
||||||
path: artifacts/${{ matrix.identifier }}
|
path: artifacts/${{ matrix.identifier }}
|
||||||
@@ -75,42 +81,39 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Build
|
needs: Build
|
||||||
|
|
||||||
# IMPORTANT: prevents running on tag pushes
|
|
||||||
if: github.ref_type == 'branch'
|
if: github.ref_type == 'branch'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get short SHA
|
||||||
|
id: vars
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
|
||||||
|
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Create zip files
|
||||||
|
run: |
|
||||||
|
mkdir -p release_files
|
||||||
|
|
||||||
|
cd artifacts/libsm64_linux
|
||||||
|
zip -r ../../release_files/libsm64_linux.zip .
|
||||||
|
|
||||||
|
cd ../libsm64_windows
|
||||||
|
zip -r ../../release_files/libsm64_windows.zip .
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: release
|
uses: akkuman/gitea-release-action@v1
|
||||||
uses: gitea/actions/gitea-release-action@v1
|
|
||||||
with:
|
with:
|
||||||
api_key: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
owner: NepuShiro
|
repository: NepuShiro/libsm64
|
||||||
repo: libsm64
|
tag_name: build-${{ github.ref_name }}-${{ steps.vars.outputs.short_sha }}
|
||||||
tag_name: build-${{ github.sha }}
|
name: Snapshot Build ${{ github.ref_name }}-${{ steps.vars.outputs.short_sha }}
|
||||||
release_name: Snapshot Build ${{ github.sha }}
|
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
files: |
|
||||||
- name: Upload Linux artifact
|
release_files/libsm64_linux.zip
|
||||||
uses: actions/upload-release-asset@v1
|
release_files/libsm64_windows.zip
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.release.outputs.upload_url }}
|
|
||||||
asset_path: artifacts/libsm64_linux.zip
|
|
||||||
asset_name: libsm64_linux.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
|
|
||||||
- name: Upload Windows artifact
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.release.outputs.upload_url }}
|
|
||||||
asset_path: artifacts/libsm64_windows.zip
|
|
||||||
asset_name: libsm64_windows.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
Reference in New Issue
Block a user