diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..6f336a2 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,20 @@ +on: + push: + branches: + - "main" + +name: "Publish" +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: npm ci + - run: npm test + - run: npm run build + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 582dc0f..a17311a 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -7,7 +7,7 @@ on: jobs: bump-version: - name: 'Bump version and publish' + name: 'Bump Version on main' # Prefix with "MAJOR:" to bump major # "MINOR:" or "FEAT:" bump minor # "PRE-ALPHA:", "PRE-BETA:", "PRE-RC:" bump pre-release version @@ -25,8 +25,7 @@ jobs: id: version-bump uses: 'phips28/gh-action-bump-version@master' with: - skip-commit: 'true' - skip-tag: 'true' + tag-prefix: 'v' minor-wording: 'MINOR,FEAT' major-wording: 'MAJOR,BREAKING' patch-wording: 'PATCH,FIXES'