Release #6
Workflow file for this run
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: Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install pkg globally | |
run: npm install -g pkg | |
- name: Install pnpm globally | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build for Windows | |
run: npm run build:win | |
- name: Package files | |
run: | | |
zip -r release.zip server.exe public | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.event.release.tag_name }} | |
name: Release ${{ github.event.release.tag_name }} | |
body: | | |
This release includes the following assets: | |
- server.exe | |
- public | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload release Asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./release.zip | |
asset_name: release.zip | |
asset_content_type: application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |