Skip to content

Release package

Release package #13

Workflow file for this run

name: Release package
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
DEPLOYMENT_URL: https://www.npmjs.com/package/@dataesr/doadify
jobs:
release:
name: Release new version
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 📦 Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
#tag_name: ${{ steps.tag.outputs.tag }}
publish:
name: Publish release on NPM
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@dataesr'
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
notify:
name: Notify
needs: publish
if: always()
runs-on: ubuntu-latest
steps:
- uses: dataesr/mm-notifier-action@v1
with:
deployment_url: ${{ env.DEPLOYMENT_URL }}
github_token: ${{ secrets.GITHUB_TOKEN }}
mattermost_channel: bots
mattermost_webhook_url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}