update with gitea release action
This commit is contained in:
parent
c1fbe13d1c
commit
117a0b9482
@ -1,11 +1,18 @@
|
|||||||
name: Build project
|
name: Build project
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**' # Run on pushes to any branch
|
||||||
|
tags-ignore:
|
||||||
|
- '**' # Ignore pushes to tags
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '**' # Run on pull requests to any branch
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildForAllSupportedPlatforms:
|
buildForAllSupportedPlatforms:
|
||||||
name: Build for ${{ matrix.targetPlatform }}
|
name: Build for ${{ matrix.targetPlatform }}
|
||||||
# runs-on: ubuntu-22.04-large
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -29,24 +36,6 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
Library-
|
Library-
|
||||||
|
|
||||||
# - uses: https://github.com/game-ci/unity-test-runner@v4
|
|
||||||
# id: testRunner
|
|
||||||
# env:
|
|
||||||
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
||||||
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
||||||
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
||||||
# with:
|
|
||||||
# unityVersion: ${{ matrix.unityVersion }}
|
|
||||||
# githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# - uses: actions/upload-artifact@v3
|
|
||||||
# if: always()
|
|
||||||
# with:
|
|
||||||
# name: Test results (all modes)
|
|
||||||
# path: ${{ steps.testRunner.outputs.artifactsPath }}
|
|
||||||
# - if: matrix.targetPlatform == 'Android'
|
|
||||||
# uses: jlumbroso/free-disk-space@v1.2.0
|
|
||||||
|
|
||||||
- uses: https://github.com/game-ci/unity-builder@v4
|
- uses: https://github.com/game-ci/unity-builder@v4
|
||||||
env:
|
env:
|
||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
@ -57,7 +46,6 @@ jobs:
|
|||||||
runAsHostUser: true
|
runAsHostUser: true
|
||||||
unityVersion: ${{ matrix.unityVersion }}
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
# customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'
|
|
||||||
|
|
||||||
- name: Zip build artifacts
|
- name: Zip build artifacts
|
||||||
run: |
|
run: |
|
||||||
@ -74,23 +62,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ls -R /tmp/zipped_builds
|
ls -R /tmp/zipped_builds
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Gitea Release and Upload Assets
|
||||||
id: create_release
|
uses: akkuman/gitea-release-action@v1
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
NODE_OPTIONS: '--experimental-fetch' # Required for Node.js < 18
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} # Gitea token for authentication
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.sha }}
|
server_url: ${{ github.server_url }} # Gitea server URL (defaults to GitHub's server URL)
|
||||||
release_name: Release ${{ github.sha }}
|
tag_name: ${{ github.sha }} # Use the commit SHA as the tag name
|
||||||
draft: false
|
name: Release ${{ github.sha }} # Release name
|
||||||
prerelease: false
|
draft: false # Do not create a draft release
|
||||||
|
prerelease: false # Do not mark as a prerelease
|
||||||
- name: Upload Release Asset
|
files: |
|
||||||
uses: actions/upload-release-asset@v1
|
/tmp/zipped_builds/build_${{ matrix.targetPlatform }}.zip
|
||||||
env:
|
md5sum: true # Generate and upload MD5 checksums
|
||||||
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
sha256sum: true # Generate and upload SHA-256 checksums
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: /tmp/zipped_builds/build_${{ matrix.targetPlatform }}.zip
|
|
||||||
asset_name: build_${{ matrix.targetPlatform }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
Loading…
Reference in New Issue
Block a user