Skip to content

2.4.0 - Leap Year Starting Year and Bug Fixes #77

2.4.0 - Leap Year Starting Year and Bug Fixes

2.4.0 - Leap Year Starting Year and Bug Fixes #77

Workflow file for this run

# This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Update Release's
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Manifest and Download Links
id: manifest_link_version
uses: cschleiden/replace-tokens@v1
with:
files: './src/module.json'
env:
MANIFEST: https://github.com/${{github.repository}}/releases/latest/download/module.json
DOWNLOAD: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Archive dist folder
uses: actions/upload-artifact@v3
with:
name: module-download
path: dist/
- name: Archive module json
uses: actions/upload-artifact@v3
with:
name: module
path: dist/module.json
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download module download file
uses: actions/download-artifact@v3
with:
name: module-download
path: module-download
- name: Download module.json
uses: actions/download-artifact@v3
with:
name: module
# Create a zip file with all files required by the module to add to the release
- run: (cd module-download; zip -r ../module.zip .)
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # Set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json, ./module.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
publish:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}