Skip to content

Merge pull request #22 from fintoc-com/main #9

Merge pull request #22 from fintoc-com/main

Merge pull request #22 from fintoc-com/main #9

Workflow file for this run

name: release
on:
push:
branches:
- stable
jobs:
npm-release:
runs-on: ubuntu-22.04
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up Node.js v20
uses: actions/setup-node@v4
with:
node-version: '20.9.0'
registry-url: https://registry.npmjs.org
# Cache the node_modules directory
- name: Set up node_modules cache
uses: actions/cache@v2
id: node-modules-cache
with:
key: node-modules-cache-${{ hashFiles('**/package-lock.json') }}
path: '**/node_modules'
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build the package
run: npm run build
- name: Publish the package
run: npm publish
github-release:
needs: npm-release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Node.js v20
uses: actions/setup-node@v4
with:
node-version: '20.9.0'
# Cache the node_modules directory
- name: Set up node_modules cache
uses: actions/cache@v2
id: node-modules-cache
with:
key: node-modules-cache-${{ hashFiles('**/package-lock.json') }}
path: '**/node_modules'
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Get version
id: version
run: echo ::set-output name=version::$(npm run --silent version:get)
- name: Get Pull Request data
uses: jwalton/gh-find-current-pr@v1
id: find-pr
with:
state: all
- name: Tag and Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: ${{ steps.version.outputs.version }}
body: |
${{ steps.find-pr.outputs.body }}
draft: false
prerelease: false