Skip to content

0.9.23

0.9.23 #37

Workflow file for this run

name: Publish new version
on:
push:
tags:
- 'v*'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 17
- run: npm ci
- run: npm test
release:
name: Create Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
# Note: GITHUB_TOKEN and github.ref is provided by Actions, you do not need to care about it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
# TODO: Figure out how to automate meaningfull body
body: |
Release ${{ github.ref }}
draft: false
prerelease: false
publish-npm:
name: Publish on NPM package registry
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 17
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
publish-github:
name: Publish on GitHub package registry
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 17
registry-url: https://npm.pkg.github.com/
# Note: This is an awful solution to publish this package as "foo" on NPM and "@hejny/foo" on GitHub
- run: "sed -i -e 's/\\\"name\\\"\\: \\\"/\\\"name\\\": \\\"\\@hejny\\//g' ./package.json"
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}