@mafintosh/ci-testing 2.0.1 → 3.0.2

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.
@@ -1,4 +1,4 @@
1
- name: Publish
1
+ name: Release to public npm
2
2
  on:
3
3
  pull_request:
4
4
  types: [closed]
@@ -9,14 +9,26 @@ 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
+ npm version $VERSION --no-git-tag-version --allow-same-version
27
+ git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
28
+ if ! git ls-remote --tags origin | grep -q "refs/tags/v$VERSION$"; then
29
+ git tag "v$VERSION"
30
+ git push origin "v$VERSION"
31
+ fi
32
+ npm publish --access public --provenance --tag latest --ignore-scripts
33
+ env:
34
+ 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.2",
4
4
  "description": "hello",
5
5
  "homepage": "https://github.com/mafintosh/ci-testing#readme",
6
6
  "bugs": {
@@ -1,35 +0,0 @@
1
- name: Release to public npm
2
- run-name: "Release (${{ inputs.bump }}${{ inputs.preid && format('-{0}', inputs.preid) || '' }})"
3
- on:
4
- workflow_dispatch:
5
- inputs:
6
- bump:
7
- description: Version bump type
8
- required: true
9
- type: choice
10
- options:
11
- - patch
12
- - minor
13
- - major
14
- - prerelease
15
- preid:
16
- description: Pre-release identifier
17
- required: false
18
- type: string
19
- tag:
20
- description: npm dist-tag
21
- required: false
22
- default: 'latest'
23
- type: string
24
- permissions:
25
- contents: write
26
- id-token: write
27
- jobs:
28
- release:
29
- uses: mafintosh/actions/.github/workflows/public-publish.yml@main
30
- with:
31
- bump: ${{ inputs.bump }}
32
- preid: ${{ inputs.preid }}
33
- tag: ${{ inputs.tag }}
34
- secrets:
35
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}