Update .gitea/workflows/release.yml
This commit is contained in:
@@ -175,16 +175,13 @@ jobs:
|
|||||||
|
|
||||||
release-dev:
|
release-dev:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.ref_name == 'dev' }}
|
if: ${{ github.ref == 'refs/heads/dev' }}
|
||||||
needs:
|
needs:
|
||||||
- meta
|
- meta
|
||||||
- android-build
|
- android-build
|
||||||
- linux-build
|
- linux-build
|
||||||
- windows-build
|
# - windows-build # see below
|
||||||
steps:
|
steps:
|
||||||
- name: Note branch (dev release)
|
|
||||||
run: echo "Not dev branch (${GITHUB_REF_NAME}), release-dev will be skipped."
|
|
||||||
|
|
||||||
- name: Download Android APK
|
- name: Download Android APK
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -230,23 +227,52 @@ jobs:
|
|||||||
|
|
||||||
release-master:
|
release-master:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.ref_name == 'master' }}
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
needs:
|
needs:
|
||||||
- meta
|
- meta
|
||||||
- android-build
|
- android-build
|
||||||
- linux-build
|
- linux-build
|
||||||
- windows-build
|
# - windows-build
|
||||||
steps:
|
steps:
|
||||||
- name: Note branch (master release)
|
|
||||||
if: ${{ github.ref_name != 'master' }}
|
|
||||||
run: echo "Not master branch (${GITHUB_REF_NAME}), release-master will be skipped."
|
|
||||||
|
|
||||||
- name: Download Android APK
|
- name: Download Android APK
|
||||||
if: ${{ github.ref_name == 'master' }}
|
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: android-apk
|
name: android-apk
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Download Linux bundle
|
- name: Download Linux bundle
|
||||||
if: ${{ github.ref_name == 'master' }}
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: linux-bundle
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Download Windows bundle (optional)
|
||||||
|
if: ${{ env.BUILD_WINDOWS == 'true' }}
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: windows-zip
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Prepare artefacts and tag
|
||||||
|
id: bundle
|
||||||
|
run: |
|
||||||
|
BASE="${{ needs.meta.outputs.base_version }}"
|
||||||
|
TAG="v${BASE}"
|
||||||
|
|
||||||
|
mv artifacts/app-release.apk "artifacts/app-${BASE}.apk"
|
||||||
|
mv artifacts/app-linux-x64.tar.gz "artifacts/app-linux-x64-${BASE}.tar.gz"
|
||||||
|
if [ -f artifacts/app-windows-x64.zip ]; then
|
||||||
|
mv artifacts/app-windows-x64.zip "artifacts/app-windows-x64-${BASE}.zip"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "files=artifacts/*" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Create release on Gitea
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
tag: ${{ steps.bundle.outputs.tag }}
|
||||||
|
name: ${{ steps.bundle.outputs.tag }}
|
||||||
|
prerelease: false
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
artifacts: ${{ steps.bundle.outputs.files }}
|
||||||
|
|||||||
Reference in New Issue
Block a user