3.3 #5
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: Deployment | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 18.x ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build Frontend | |
run: | | |
cd gui | |
npm install -g pnpm | |
pnpm install | |
pnpm release | |
- name: Use Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Build Backend | |
run: | | |
go build . | |
mv code-statistic stats | |
mv stats deploy/ | |
- name: Process Application | |
run: mv app deploy/app/ | |
- name: Pack Application | |
run: | | |
zip -r deployment.zip ./deploy/* | |
- name: Upload Package | |
uses: actions/upload-release-asset@v1.0.2 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./deployment.zip | |
asset_name: deployment.zip | |
asset_content_type: application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} |