Skip to content

Release

Release #23

Workflow file for this run

name: "Release"
on:
workflow_dispatch:
inputs:
release_version:
description: 'Version number of the release'
required: true
jobs:
gh_tagged_release:
name: Create tagged release
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-
- name: Setup NodeJs
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install Dependencies
run: npm install
- name: Set app version (Unix)
run: npm version ${{ github.event.inputs.release_version }} --no-git-tag-version
- name: Build Project
run: npm run build
- name: "Create Github release (full)"
if: ${{ !contains( github.event.inputs.release_version, '-rc' ) }}
uses: softprops/action-gh-release@v1
id: pm_index_card_release
with:
body: "Release version ${{ github.event.inputs.release_version }}."
tag_name: ${{ github.event.inputs.release_version }}
target_commitish: "main"
draft: false
prerelease: false
files: dist/pm-index-card.js
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}