feat: ✨ add downloader /hpm #13
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: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- name: Get package version | |
id: version | |
run: echo "::set-output name=version::$(node -p "require('./package.json').version")" | |
- name: Install dependencies | |
run: | | |
npm install | |
npm install -g electron-packager | |
- name: Build Electron app | |
run: npm run build | |
- name: Zip the app | |
run: Compress-Archive -Path build/Haino-win32-x64 -DestinationPath build/Haino-win32-x64.zip -Force | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
build/Haino-win32-x64.zip | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: v${{ steps.version.outputs.version }} | |
name: Release v${{ steps.version.outputs.version }} | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |