From 5cb789b060a3a4689f99230176c5b6c2d92ce228 Mon Sep 17 00:00:00 2001 From: Dennis Coorn Date: Thu, 7 Nov 2019 12:38:50 +0100 Subject: [PATCH] GitHub workflow action added to automate publishing the package to the registry --- .github/workflows/npmpublish.yml | 21 +++++++++++++++++++++ package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/npmpublish.yml diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml new file mode 100644 index 0000000..b1060c8 --- /dev/null +++ b/.github/workflows/npmpublish.yml @@ -0,0 +1,21 @@ +name: Publish package + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + scope: '@leviy' + - run: | + npm --no-git-tag-version version ${{github.event.release.name}} + npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package.json b/package.json index 50b6a1d..0aa9ba8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leviy/babel-preset-default", - "version": "2.0.3", + "version": "0.0.0", "repository": { "type": "git", "url": "git+ssh://git@github.com:leviy/babel-preset-default.git"