mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-06 19:25:34 +00:00
update workflow
This commit is contained in:
parent
39e710f4b1
commit
d896009064
54
.github/workflows/release.yml
vendored
54
.github/workflows/release.yml
vendored
@ -3,29 +3,32 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: 'Tag'
|
description: "Tag"
|
||||||
required: true
|
required: true
|
||||||
default: 'v1.x.x'
|
default: "v1.x.x"
|
||||||
latest:
|
latest:
|
||||||
description: 'Set as latest'
|
description: "Set as latest"
|
||||||
required: true
|
required: true
|
||||||
default: 'true'
|
default: "true"
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- true
|
- true
|
||||||
- false
|
- false
|
||||||
draft:
|
is_draft:
|
||||||
description: 'Set as draft'
|
description: "Set as draft"
|
||||||
required: true
|
required: true
|
||||||
type: choice
|
type: choice
|
||||||
default: 'true'
|
default: "true"
|
||||||
options:
|
options:
|
||||||
- true
|
- true
|
||||||
- false
|
- false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04, windows-2019]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
steps:
|
steps:
|
||||||
- name: Clone client
|
- name: Clone client
|
||||||
@ -59,11 +62,8 @@ jobs:
|
|||||||
python -m poetry install
|
python -m poetry install
|
||||||
- name: Build server
|
- name: Build server
|
||||||
run: |
|
run: |
|
||||||
pwd
|
|
||||||
ls ./client
|
|
||||||
ls ./assets
|
|
||||||
python -m poetry run python manage.py --build
|
python -m poetry run python manage.py --build
|
||||||
env:
|
env:
|
||||||
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
|
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
|
||||||
LASTFM_API_KEY: ${{ secrets.LASTFM_API_KEY }}
|
LASTFM_API_KEY: ${{ secrets.LASTFM_API_KEY }}
|
||||||
- name: Verify build success
|
- name: Verify build success
|
||||||
@ -72,14 +72,34 @@ jobs:
|
|||||||
echo "Build failed"
|
echo "Build failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Create Release
|
- name: Upload Linux binary
|
||||||
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: swingmusic
|
||||||
|
path: dist/swingmusic
|
||||||
|
retention-days: 1
|
||||||
|
- name: Upload Windows binary
|
||||||
|
if: matrix.os == 'windows-2019'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: swingmusic.exe
|
||||||
|
path: dist/swingmusic.exe
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download all binaries
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
- name: Upload binaries to GitHub Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: "dist/swingmusic"
|
artifacts: "dist/swingmusic*"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag: ${{ inputs.tag }}
|
tag: ${{ inputs.tag }}
|
||||||
commit: ${{ github.sha }}
|
commit: ${{ github.sha }}
|
||||||
draft: ${{ inputs.draft }}
|
draft: ${{ inputs.is_draft }}
|
||||||
artifactErrorsFailBuild: true
|
artifactErrorsFailBuild: true
|
||||||
name: New Release
|
name: ${{ inputs.tag }}
|
||||||
bodyFile: .github/changelog.md
|
bodyFile: .github/changelog.md
|
||||||
|
Loading…
x
Reference in New Issue
Block a user