mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
Update release.yml
This commit is contained in:
@@ -33,98 +33,98 @@ on:
|
|||||||
- false
|
- false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
# build:
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
os: [ubuntu-20.04, windows-2019]
|
# os: [ubuntu-20.04, windows-2019]
|
||||||
runs-on: ${{ matrix.os }}
|
# runs-on: ${{ matrix.os }}
|
||||||
name: Create binary on ${{ matrix.os }}
|
# name: Create binary on ${{ matrix.os }}
|
||||||
steps:
|
# steps:
|
||||||
- name: Clone client
|
# - name: Clone client
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
- name: Setup Node 16
|
# - name: Setup Node 16
|
||||||
uses: actions/setup-node@v3
|
# uses: actions/setup-node@v3
|
||||||
with:
|
# with:
|
||||||
node-version: 16.x
|
# node-version: 16.x
|
||||||
- name: Install yarn
|
# - name: Install yarn
|
||||||
run: |
|
# run: |
|
||||||
npm install -g yarn
|
# npm install -g yarn
|
||||||
- name: Clone client
|
# - name: Clone client
|
||||||
run: |
|
# run: |
|
||||||
git clone https://github.com/cwilvx/swingmusic-client.git
|
# git clone https://github.com/cwilvx/swingmusic-client.git
|
||||||
- name: Install dependencies & Build client
|
# - name: Install dependencies & Build client
|
||||||
run: |
|
# run: |
|
||||||
cd swingmusic-client
|
# cd swingmusic-client
|
||||||
yarn install
|
# yarn install
|
||||||
yarn build --outDir ../client
|
# yarn build --outDir ../client
|
||||||
cd ..
|
# cd ..
|
||||||
- name: Install Python 3.10.11
|
# - name: Install Python 3.10.11
|
||||||
uses: actions/setup-python@v2
|
# uses: actions/setup-python@v2
|
||||||
with:
|
# with:
|
||||||
python-version: "3.10.11"
|
# python-version: "3.10.11"
|
||||||
- name: Install Poetry
|
# - name: Install Poetry
|
||||||
run: |
|
# run: |
|
||||||
pip install poetry
|
# pip install poetry
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
run: |
|
# run: |
|
||||||
python -m poetry install
|
# python -m poetry install
|
||||||
- name: Build server
|
# - name: Build server
|
||||||
run: |
|
# run: |
|
||||||
python -m poetry run python manage.py --build
|
# python -m poetry run python manage.py --build
|
||||||
env:
|
# env:
|
||||||
SWINGMUSIC_APP_VERSION: ${{ inputs.tag }}
|
# SWINGMUSIC_APP_VERSION: ${{ inputs.tag }}
|
||||||
- name: Verify Linux build success
|
# - name: Verify Linux build success
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
# if: matrix.os == 'ubuntu-20.04'
|
||||||
run: |
|
# run: |
|
||||||
if [ ! -f "./dist/swingmusic" ]; then
|
# if [ ! -f "./dist/swingmusic" ]; then
|
||||||
echo "Build failed"
|
# echo "Build failed"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
- name: Verify Windows build success
|
# - name: Verify Windows build success
|
||||||
if: matrix.os == 'windows-2019'
|
# if: matrix.os == 'windows-2019'
|
||||||
run: |
|
# run: |
|
||||||
if (-not (Test-Path "./dist/swingmusic.exe")) {
|
# if (-not (Test-Path "./dist/swingmusic.exe")) {
|
||||||
Write-Host "Build failed"
|
# Write-Host "Build failed"
|
||||||
exit 1
|
# exit 1
|
||||||
}
|
# }
|
||||||
- name: Upload Linux binary
|
# - name: Upload Linux binary
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
# if: matrix.os == 'ubuntu-20.04'
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: linux
|
# name: linux
|
||||||
path: dist/swingmusic
|
# path: dist/swingmusic
|
||||||
retention-days: 1
|
# retention-days: 1
|
||||||
- name: Upload Windows binary
|
# - name: Upload Windows binary
|
||||||
if: matrix.os == 'windows-2019'
|
# if: matrix.os == 'windows-2019'
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: win32
|
# name: win32
|
||||||
path: dist/swingmusic.exe
|
# path: dist/swingmusic.exe
|
||||||
retention-days: 1
|
# retention-days: 1
|
||||||
|
|
||||||
release:
|
# release:
|
||||||
name: Create New Release
|
# name: Create New Release
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
needs: build
|
# needs: build
|
||||||
permissions: write-all
|
# permissions: write-all
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout into repo
|
# - name: Checkout into repo
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
- name: Download all binaries
|
# - name: Download all binaries
|
||||||
uses: actions/download-artifact@v3
|
# uses: actions/download-artifact@v3
|
||||||
- name: Upload binaries to GitHub Release
|
# - name: Upload binaries to GitHub Release
|
||||||
uses: ncipollo/release-action@v1
|
# uses: ncipollo/release-action@v1
|
||||||
with:
|
# with:
|
||||||
allowUpdates: true
|
# allowUpdates: true
|
||||||
artifacts: "./linux/swingmusic, ./win32/swingmusic.exe"
|
# artifacts: "./linux/swingmusic, ./win32/swingmusic.exe"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
# token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag: ${{ format('v{0}',inputs.tag) }}
|
# tag: ${{ format('v{0}',inputs.tag) }}
|
||||||
commit: ${{ github.sha }}
|
# commit: ${{ github.sha }}
|
||||||
draft: ${{ inputs.is_draft }}
|
# draft: ${{ inputs.is_draft }}
|
||||||
artifactErrorsFailBuild: true
|
# artifactErrorsFailBuild: true
|
||||||
name: ${{ format('v{0}',inputs.tag) }}
|
# name: ${{ format('v{0}',inputs.tag) }}
|
||||||
bodyFile: .github/changelog.md
|
# bodyFile: .github/changelog.md
|
||||||
makeLatest: ${{ inputs.is_latest }}
|
# makeLatest: ${{ inputs.is_latest }}
|
||||||
docker:
|
docker:
|
||||||
name: Build and push Docker image
|
name: Build and push Docker image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -169,6 +169,6 @@ jobs:
|
|||||||
tags: ghcr.io/${{github.repository}}:${{format('v{0}', inputs.tag)}}, ${{env.LATEST_TAG}}
|
tags: ghcr.io/${{github.repository}}:${{format('v{0}', inputs.tag)}}, ${{env.LATEST_TAG}}
|
||||||
labels: org.opencontainers.image.title=Docker
|
labels: org.opencontainers.image.title=Docker
|
||||||
build-args: |
|
build-args: |
|
||||||
--provenance=false, client_tag=v${{inputs.tag}}
|
client_tag=v${{inputs.tag}}
|
||||||
env:
|
env:
|
||||||
LATEST_TAG: ${{ inputs.is_latest == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}
|
LATEST_TAG: ${{ inputs.is_latest == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user