Skip to content

Release

Release #19

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
release-version:
description: 'Version being released'
required: true
jobs:
release:
name: Verify Build & Release
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Check Node Version
run: node --version
- name: Checkout code
uses: actions/checkout@v3
with:
ref: main
- name: Configure Git
run: |
git init
git config --global user.name "apicurio-ci"
git config --global user.email "apicurio.ci@gmail.com"
git branch --set-upstream-to=origin/main
git pull
echo "#### Listing files ####"
find .
- name: Set release version in package.json
run: |
npm version ${{ github.event.inputs.release-version }}
- name: Build Project
run: |
npm install
npm run lint
npm run build
- name: Push Release Version Change
run: |
git push
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.release-version}}
- name: Publish to npmjs.com
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --access public
- name: Google Chat Notification (Always)
if: always()
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Google Chat Notification (Error)
if: failure()
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_ERRORS }}
status: ${{ job.status }}