Windows Release #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows Release | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: Release | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- amd64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ secrets.GH_REPO }} | |
token: ${{ secrets.GH_PAT }} | |
fetch-depth: 0 | |
- name: Get latest release version | |
shell: bash | |
run: | | |
echo "APP_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
check-latest: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'web/package.json' | |
check-latest: true | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Build frontend | |
shell: bash | |
run: | | |
pnpm install | |
pnpm build | |
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/ | |
working-directory: ./web | |
- name: Build | |
shell: bash | |
run: | | |
go mod download | |
export GOARCH=${{ matrix.arch }} | |
bash build.sh | |
- name: Package | |
shell: bash | |
run: | | |
dist="kikoeru-windows-${{ matrix.arch }}" | |
mkdir -p "$dist" | |
cp kikoeru.exe scripts/start.bat "$dist/" | |
7z a "$dist.zip" "$dist/" | |
- name: Publish | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ env.APP_VERSION }} | |
tag_name: ${{ env.APP_VERSION }} | |
draft: true | |
body: | | |
The releases are generated by GitHub Actions. | |
files: | | |
kikoeru-*.* |