Release #12
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: Release | |
on: | |
workflow_dispatch: # Allows manual triggering from the GitHub Actions UI | |
push: | |
tags: | |
- 'v*.*.*' # Triggers on tags matching the pattern 'vX.X.X' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install | |
- name: Generate .npmrc | |
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Setup git user | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "marianfoo" | |
- name: Log git status and diff | |
run: | | |
echo "Checking git status..." | |
git status | |
echo "Checking git diff..." | |
git diff | |
- name: Create Release | |
run: npm run release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |