Skip to content

Release

Release #17

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
setup:
runs-on: ubuntu-latest
outputs:
DATE: ${{ steps.get_date.outputs.DATE }}
steps:
- name: Get current date
id: get_date
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
windows:
strategy:
matrix:
os-version: ['x64', 'arm64']
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- name: build
run: |
pnpm install
pnpm run build:win-${{ matrix.os-version }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: zip-unpacked-x64
if: matrix.os-version == 'x64'
run: |
cd .\dist\win-unpacked
7z a -r Final2x-windows-${{ matrix.os-version }}-unpacked.7z *
- name: zip-unpacked-arm64
if: matrix.os-version == 'arm64'
run: |
cd .\dist\win-arm64-unpacked
7z a -r Final2x-windows-${{ matrix.os-version }}-unpacked.7z *
- name: rename
run: |
cd .\dist
ren *.exe Final2x-windows-${{ matrix.os-version }}-setup.exe
shell: cmd
- name: upload-setup
uses: actions/upload-artifact@v3
with:
path: dist/*.exe
- name: upload-unpacked-x64
if: matrix.os-version == 'x64'
uses: actions/upload-artifact@v3
with:
path: dist/win-unpacked/*.7z
- name: upload-unpacked-arm64
if: matrix.os-version == 'arm64'
uses: actions/upload-artifact@v3
with:
path: dist/win-arm64-unpacked/*.7z
macos:
strategy:
matrix:
os-version: ['x64', 'arm64']
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- name: build
run: |
pnpm install
pnpm run build:mac-${{ matrix.os-version }}
env:
ARCH: ${{ matrix.os-version }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: rename
run: |
cd ./dist
mv *.dmg Final2x-macos-${{ matrix.os-version }}-dmg.dmg
- name: zip-unpacked-x64
if: matrix.os-version == 'x64'
run: |
cd ./dist/mac
7z a -r Final2x-macos-${{ matrix.os-version }}-unpacked.7z *
- name: zip-unpacked-arm64
if: matrix.os-version == 'arm64'
run: |
cd ./dist/mac-arm64
7z a -r Final2x-macos-${{ matrix.os-version }}-unpacked.7z *
- name: upload-dmg
uses: actions/upload-artifact@v3
with:
path: dist/*.dmg
- name: upload-unpacked-x64
if: matrix.os-version == 'x64'
uses: actions/upload-artifact@v3
with:
path: dist/mac/*.7z
- name: upload-unpacked-arm64
if: matrix.os-version == 'arm64'
uses: actions/upload-artifact@v3
with:
path: dist/mac-arm64/*.7z
linux-pip:
strategy:
matrix:
os-version: ['x64']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- name: build
run: |
pnpm install
pnpm run build:linux-${{ matrix.os-version }}
env:
SKIP_DOWNLOAD_CORE: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: zip-unpacked
run: |
cd ./dist/linux-unpacked
7z a -r Final2x-linux-pip-${{ matrix.os-version }}-unpacked.7z *
- name: rename
run: |
cd ./dist
mv *.snap Final2x-linux-pip-${{ matrix.os-version }}-snap.snap
mv *.AppImage Final2x-linux-pip-${{ matrix.os-version }}-AppImage.AppImage
mv *.deb Final2x-linux-pip-${{ matrix.os-version }}-deb.deb
- name: upload-snap
uses: actions/upload-artifact@v3
with:
path: dist/*.snap
- name: upload-AppImage
uses: actions/upload-artifact@v3
with:
path: dist/*.AppImage
- name: upload-deb
uses: actions/upload-artifact@v3
with:
path: dist/*.deb
- name: upload-unpacked
uses: actions/upload-artifact@v3
with:
path: dist/linux-unpacked/*.7z
Release:
needs: [setup, windows, macos, linux-pip]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: asset
- name: dist
run: |
mkdir dist
cp asset/artifact/* dist
cd dist && ls
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
name: Release ${{ needs.setup.outputs.DATE }}
tag_name: ${{ needs.setup.outputs.DATE }}
body: Auto Release.
draft: false
prerelease: false
files: dist/*