@mafintosh/ci-testing 2.0.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,14 +9,28 @@ jobs:
9
9
  if: "${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Release: ') }}"
10
10
  runs-on: ubuntu-latest
11
11
  environment: release
12
- steps:
13
- - run: echo "Approved"
14
- publish:
15
- needs: approve-release
16
- if: "${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Release: ') }}"
17
12
  permissions:
18
13
  contents: write
19
14
  id-token: write
20
- uses: mafintosh/actions/.github/workflows/auto-publish.yml@main
21
- secrets:
22
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15
+ steps:
16
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
17
+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
18
+ with:
19
+ node-version: lts/*
20
+ registry-url: 'https://registry.npmjs.org'
21
+ - run: npm whoami
22
+ env:
23
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24
+ - run: |
25
+ VERSION=$(node -p "require('./package.json').version")
26
+ PR_TITLE="${{ github.event.pull_request.title }}"
27
+ TAG=$(echo "$PR_TITLE" | grep -oP '(?<=@)\S+' || echo "latest")
28
+ npm version $VERSION --no-git-tag-version --allow-same-version
29
+ git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
30
+ if ! git ls-remote --tags origin | grep -q "refs/tags/v$VERSION$"; then
31
+ git tag "v$VERSION"
32
+ git push origin "v$VERSION"
33
+ fi
34
+ npm publish --access public --provenance --tag $TAG
35
+ env:
36
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mafintosh/ci-testing",
3
- "version": "2.0.1",
3
+ "version": "3.0.1",
4
4
  "description": "hello",
5
5
  "homepage": "https://github.com/mafintosh/ci-testing#readme",
6
6
  "bugs": {