Skip to content

Release v1.2.1 🚀

Release v1.2.1 🚀 #6

Workflow file for this run

name: publish
on:
pull_request:
branches:
- main
types:
- closed
jobs:
publish-tag-and-release:
if: ${{ startsWith(github.head_ref, 'release-') && github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- id: publish
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
- if: ${{ steps.publish.outputs.type }}
name: Get release version
uses: xom9ikk/split@v1.1
id: split
with:
string: ${{ github.head_ref }}
separator: 'release-'
- if: ${{ steps.publish.outputs.type }}
name: Create tag and release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.split.outputs._1 }}
tag_name: ${{ steps.split.outputs._1 }}
target_commitish: main
generate_release_notes: true