Create Tagged Release #55
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: "Create Tagged 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 github-actions@github.com | |
- 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@v2 | |
id: expander_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: public/expander-card.js | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |