2022-04-20 00:51:37 -04:00
|
|
|
name: Kick off Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
types: [releaseLauncher]
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
bump:
|
|
|
|
description: "Semver Bump Type"
|
|
|
|
required: true
|
|
|
|
default: "patch"
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- patch
|
|
|
|
- minor
|
|
|
|
- major
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
kick-off-release:
|
|
|
|
if: github.repository == 'open-goal/launcher'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-06-22 00:00:47 -04:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-20 00:51:37 -04:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.BOT_PAT }}
|
|
|
|
|
|
|
|
- name: setup node
|
2022-06-21 22:34:08 -04:00
|
|
|
uses: actions/setup-node@v3
|
2022-04-20 00:51:37 -04:00
|
|
|
with:
|
|
|
|
node-version: 16
|
2022-08-08 20:01:11 -04:00
|
|
|
cache: npm
|
|
|
|
|
|
|
|
- name: Install Rust Stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2022-04-20 00:51:37 -04:00
|
|
|
|
2022-08-11 23:08:52 -04:00
|
|
|
- name: Install Linux Dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev libglew2.1 patchelf
|
|
|
|
|
2022-04-20 00:51:37 -04:00
|
|
|
- name: bump versions with new tag value
|
|
|
|
id: version-bump
|
|
|
|
run: |
|
|
|
|
npm version ${{ github.event.inputs.bump }} --no-git-tag-version
|
|
|
|
NEW_VERSION=$(awk '/version/{gsub(/("|",)/,"",$2);print $2}' package.json)
|
|
|
|
sed -i "/APP_VERSION/c\version = \""$NEW_VERSION"\" # APP_VERSION" ./src-tauri/Cargo.toml
|
|
|
|
sed -i "/\"version\":/c\ \"version\": \""$NEW_VERSION"\"" ./src-tauri/tauri.conf.json
|
2022-08-08 20:01:11 -04:00
|
|
|
cd ./src-tauri
|
|
|
|
cargo check
|
2022-04-20 00:51:37 -04:00
|
|
|
echo "##[set-output name=new_version;]${NEW_VERSION}"
|
|
|
|
|
|
|
|
- name: commit version bump
|
2022-06-21 22:34:38 -04:00
|
|
|
uses: EndBug/add-and-commit@v9
|
2022-04-20 00:51:37 -04:00
|
|
|
with:
|
|
|
|
default_author: github_actor
|
|
|
|
author_name: "OpenGOALBot"
|
|
|
|
author_email: "OpenGOALBot@users.noreply.github.com"
|
2022-04-28 19:59:25 -04:00
|
|
|
message: "release: bump to version - ${{ steps.version-bump.outputs.new_version }}"
|
2022-04-20 00:51:37 -04:00
|
|
|
tag: "v${{ steps.version-bump.outputs.new_version }}"
|