Prototype: settings update #710
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: Publish npm package | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
# Setup .npmrc file to publish to GitHub Packages | |
- uses: actions/setup-node@v2 | |
env: | |
RUNNER_TEMP: /tmp #TODO: REMOVE THIS BEFORE COMMITING. | |
with: | |
node-version: '12.x' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@g-loot' | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::$( git describe --tag --abbrev=0 ) | |
- run: git describe --tag --abbrev=0 | |
- run: npm --no-git-tag-version version $( git describe --tag --abbrev=0 ) | |
- name: publish-npm | |
run: npm run deploy:framework --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '12.x' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@g-loot' | |
- name: publish-git | |
run: npm run deploy:framework | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |