Github Package Release #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Github Package Release" | |
on: | |
workflow_run: | |
workflows: [ "NPM Package Release" ] | |
types: [ "completed" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
- name: "Setup node environment" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
registry-url: 'https://npm.pkg.github.com' | |
# Rewrite package.json to have the package name scoped for publishing to the github repo. | |
- name: "Rewrite package.json for github publishing" | |
run: | | |
sed -i.orig "s/\(\"name\": \"\)\(procon-ip\"\)/\1@ylabonte\/\2/" package.json | |
- name: "Setup dependencies" | |
run: npm ci | |
- name: "Build and publish project on github.com" | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |