Pre-Release #1
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: Pre-Release | |
on: | |
workflow_dispatch: | |
inputs: | |
new-version: | |
description: 'New version to be set. (1.0.1)' | |
type: string | |
required: true | |
release-date: | |
description: 'Release date. (YYYY-MM-DD)' | |
type: string | |
required: true | |
new-dev-release: | |
description: 'Set the new dev version. (1.0.1)' | |
type: string | |
required: false | |
jobs: | |
run-lint-on-dev: | |
runs-on: ubuntu-latest | |
if: ${{ inputs.new-version }} | |
steps: | |
- name: Checkout into dev | |
uses: actions/checkout@v4 | |
with: | |
ref: dev | |
token: ${{ secrets.PAT }} | |
- name: Install project dependencies | |
run: npm install | |
- name: Run build | |
run: npm run build | |
create-rc: | |
needs: run-lint-on-dev | |
runs-on: ubuntu-latest | |
if: ${{ inputs.new-version }} | |
steps: | |
- name: Checkout into dev | |
uses: actions/checkout@v4 | |
with: | |
ref: dev | |
token: ${{ secrets.PAT }} | |
- name: Create branch rc${{ inputs.new-version }} | |
run: | | |
git checkout -b rc${{ inputs.new-version }} | |
git push -u origin rc${{ inputs.new-version }} | |
set-tag: | |
needs: create-rc | |
runs-on: ubuntu-latest | |
if: ${{ inputs.new-version }} | |
steps: | |
- name: Checkout into rc${{ inputs.new-version }} | |
uses: actions/checkout@v4 | |
with: | |
ref: rc${{ inputs.new-version }} | |
fetch-depth: 0 | |
token: ${{ secrets.PAT }} | |
- name: Set tag | |
run: | | |
git tag v${{ inputs.new-version }} HEAD | |
git push origin --tags | |
set-pre-release: | |
needs: set-tag | |
runs-on: ubuntu-latest | |
if: ${{ inputs.new-version }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2.0.5 | |
with: | |
tag_name: v${{ inputs.new-version }} | |
name: Release of version ${{ inputs.new-version }} (${{ inputs.release-date }}) | |
body: | | |
### What's New | |
- First | |
- ... | |
### Fixed Issues and Improvements | |
- First | |
- ... | |
draft: false | |
prerelease: true | |
token: ${{ secrets.PAT }} | |
update-dev-version: | |
needs: create-rc | |
runs-on: ubuntu-latest | |
if: ${{ inputs.new-version && inputs.new-dev-release }} | |
steps: | |
- name: Checkout into dev | |
uses: actions/checkout@v4 | |
with: | |
ref: dev | |
token: ${{ secrets.PAT }} | |
- name: Install project dependencies | |
run: npm install | |
- name: Update dev version into v${{ inputs.new-dev-release }} | |
run: | | |
npm run gta-update-version --newVersion=${{ inputs.new-dev-release }} | |
- name: Sign and Commit version increment to branch dev | |
uses: ./.github/os-git-actions/signed-commit/ | |
with: | |
branch: dev | |
message: 'Updated into v${{ inputs.new-dev-release }} [skip ci]' | |
newFiles: true | |
gpgPriv: ${{ secrets.GPG_SIGN_KEY }} | |
gpgPassPhrase: ${{ secrets.GPG_PASSPHRASE }} |