Skip to content

Commit 03af7f3

Browse files
committed
Allow re-publishing same version #207
1 parent 95829eb commit 03af7f3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/build.yml

+18
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ jobs:
3333

3434
- run: npm install
3535
- run: npm run package-turf
36+
37+
- name: get-npm-version
38+
id: package-version
39+
uses: martinbeentjes/npm-get-version-action@v1.3.1
40+
41+
- uses: castlabs/get-package-version-id-action@v2.0
42+
id: versions
43+
with:
44+
version: ${{steps.package-version.outputs.current-version}}
45+
token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- uses: actions/delete-package-versions@v2
48+
if: ${{ steps.versions.outputs.ids != '' }}
49+
with:
50+
package-version-ids: "${{ steps.versions.outputs.ids }}"
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
53+
3654
- run: npm publish
3755
env:
3856
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)