1.1.14 #78
Workflow file for this run
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: npm-pkg-workflow | |
on: | |
# Triggers the workflow on new release | |
release: | |
types: [ published ] | |
concurrency: | |
group: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Set up workspace | |
uses: actions/checkout@v2 | |
- name: Create new npm version | |
run: | | |
git branch | |
git checkout main | |
git branch | |
npm version --no-git-tag-version ${{ github.event.release.tag_name }} | |
git branch | |
git add package.json | |
git -c user.name='npm-pkg-bot' -c user.email='speed-highlight@protonmail.com' commit -m "[npm-pkg-bot] updated package.json to version ${{ github.event.release.tag_name }}" | |
- name: Set up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
scope: '@speed-highlight' | |
- name: Publish to npm | |
run: | | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Set up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://npm.pkg.github.com/ | |
scope: '@speed-highlight' | |
- name: Publish to github pkg | |
run: | | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push new version to github | |
run: | | |
git log | |
git status | |
git config --get remote.origin.url | |
git push | |
env: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |