0.13.0 and 0.13.1 #105
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: | |
workflow_dispatch: | |
pull_request: | |
types: [closed] | |
branches: [main] | |
jobs: | |
publish-release: | |
if: github.event.pull_request.merged == true | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "./backend -> target" | |
- name: Get npm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(npm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup npm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-npm-store-${{ hashFiles('**/package.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-store- | |
- name: Install frontend dependencies | |
run: npm install | |
- name: Build | |
id: build | |
run: | | |
$output = ./publish.ps1 -Changelog "${{ github.event.pull_request.body || 'no changelog provided' }}" | |
$version = $output | Select-Object -Last 1 | |
"version=$version" >> $env:GITHUB_OUTPUT | |
env: | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
name: Rai Pal ${{ steps.build.outputs.version }} | |
tag_name: v${{ steps.build.outputs.version }} | |
body: "${{ github.event.pull_request.body }}\n\n[![Download Rai Pal for Windows](https://shields.io/badge/-Download_Rai_Pal_for_Windows-8A2BE2?style=for-the-badge&logo=windows&logoColor=white)](https://github.com/Raicuparta/rai-pal/releases/latest/download/RaiPal.msi)" | |
files: | | |
./publish/* |