mirror of
https://github.com/lovell/sharp.git
synced 2025-12-06 03:51:40 +01:00
CI: Automate npm publish-with-provenance
Temporarily flagged with dry-run for now
This commit is contained in:
parent
0e4b648593
commit
c1e33de33c
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -300,6 +300,7 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
id-token: write
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs:
|
needs:
|
||||||
- build-native
|
- build-native
|
||||||
@ -314,11 +315,9 @@ jobs:
|
|||||||
- name: Create npm workspace tarball
|
- name: Create npm workspace tarball
|
||||||
run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
|
run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: '24'
|
||||||
- name: Create release notes
|
- name: Create release notes
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
run: npm run package-release-notes
|
run: npm run package-release-notes
|
||||||
- name: Create GitHub release for tag
|
- name: Create GitHub release for tag
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
@ -329,3 +328,9 @@ jobs:
|
|||||||
prerelease: ${{ contains(github.ref, '-rc') }}
|
prerelease: ${{ contains(github.ref, '-rc') }}
|
||||||
makeLatest: ${{ !contains(github.ref, '-rc') }}
|
makeLatest: ${{ !contains(github.ref, '-rc') }}
|
||||||
bodyFile: release-notes.md
|
bodyFile: release-notes.md
|
||||||
|
- name: Publish platform-specific npm packages
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: cd npm && npm publish --workspaces --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }} --dry-run
|
||||||
|
- name: Publish sharp npm package
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: npm publish --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }} --dry-run
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user