Skip to content

release

release #89

Workflow file for this run

name: "release"
on:
workflow_dispatch:
inputs:
change_log:
description: "Changelog"
required: true
pull_request:
types: [closed]
branches: [main]
jobs:
publish-release:
# TODO uncomment
# 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
with:
node-version: 16
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "./backend -> target"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install frontend dependencies
run: pnpm install
- name: Build
id: build
run: |
$version = ./deploy.ps1 -Changelog "${{ inputs.commit_message || github.event.pull_request.body || github.event.head_commit.message }}"
Write-Output "::set-output name=version::$version"
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_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: ${{ inputs.commit_message || github.event.pull_request.body || github.event.head_commit.message }}
files: |
./publish/*