Skip to content

Commit

Permalink
Automatically bumb the version on publish of a release
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger authored Nov 30, 2019
1 parent 170d6ed commit c74e683
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
name: Publish

on:
create:

release:
types: [published]

jobs:
publish:
name: Publish

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
registry-url: https://registry.npmjs.org/
registry-url: "https://registry.npmjs.org/"

- name: Install
run: yarn --frozen-lockfile --non-interactive

- name: Setup GIT
run: |
git config user.email "admin@minidigger.me"
git config user.name "MiniDigger"
- name: Bump version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn version --new-version $GITHUB_REF
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY"
- name: Publish
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit c74e683

Please sign in to comment.