mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-22 03:49:28 +08:00
Allow manual publishing of the npm package
This commit is contained in:
parent
746b38abe5
commit
5436ebee71
11
.github/workflows/publish-npm.yml
vendored
11
.github/workflows/publish-npm.yml
vendored
@ -1,6 +1,7 @@
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['v3-alpha']
|
branches: ['v3-alpha']
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
@ -54,14 +55,14 @@ jobs:
|
|||||||
v3/internal/runtime/desktop/@wailsio/runtime/types/**
|
v3/internal/runtime/desktop/@wailsio/runtime/types/**
|
||||||
|
|
||||||
- name: Bump version
|
- name: Bump version
|
||||||
if: steps.package-changes.outputs.files_changed == 'true'
|
if: github.event_name == 'workflow_dispatch' || steps.package-changes.outputs.files_changed == 'true'
|
||||||
id: bump-version
|
id: bump-version
|
||||||
working-directory: v3/internal/runtime/desktop/@wailsio/runtime
|
working-directory: v3/internal/runtime/desktop/@wailsio/runtime
|
||||||
run: |
|
run: |
|
||||||
echo "version=$(npm version prerelease)" >> $GITHUB_OUTPUT
|
echo "version=$(npm version prerelease)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
if: steps.package-changes.outputs.files_changed == 'true'
|
if: github.event_name == 'workflow_dispatch' || steps.package-changes.outputs.files_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
git commit -m "[skip ci] Publish @wailsio/runtime ${{ steps.bump-version.outputs.version }}"
|
git commit -m "[skip ci] Publish @wailsio/runtime ${{ steps.bump-version.outputs.version }}"
|
||||||
@ -69,14 +70,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish npm package
|
- name: Publish npm package
|
||||||
uses: JS-DevTools/npm-publish@v3
|
uses: JS-DevTools/npm-publish@v3
|
||||||
if: steps.package-changes.outputs.files_changed == 'true'
|
if: github.event_name == 'workflow_dispatch' || steps.package-changes.outputs.files_changed == 'true'
|
||||||
with:
|
with:
|
||||||
package: v3/internal/runtime/desktop/@wailsio/runtime
|
package: v3/internal/runtime/desktop/@wailsio/runtime
|
||||||
access: public
|
access: public
|
||||||
token: ${{ secrets.NPM_TOKEN }}
|
token: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Detect docs and bundled runtime changes
|
- name: Detect docs and bundled runtime changes
|
||||||
if: steps.package-changes.outputs.files_changed != 'true'
|
if: github.event_name != 'workflow_dispatch' && steps.package-changes.outputs.files_changed != 'true'
|
||||||
uses: tj-actions/verify-changed-files@v20
|
uses: tj-actions/verify-changed-files@v20
|
||||||
id: docs-bundle-changes
|
id: docs-bundle-changes
|
||||||
with:
|
with:
|
||||||
@ -85,7 +86,7 @@ jobs:
|
|||||||
v3/internal/runtime/desktop/@wailsio/runtime/docs/**
|
v3/internal/runtime/desktop/@wailsio/runtime/docs/**
|
||||||
|
|
||||||
- name: Commit docs and bundled runtime changes
|
- name: Commit docs and bundled runtime changes
|
||||||
if: steps.package-changes.outputs.files_changed != 'true' && steps.docs-bundle-changes.outputs.files_changed == 'true'
|
if: github.event_name != 'workflow_dispatch' && steps.package-changes.outputs.files_changed != 'true' && steps.docs-bundle-changes.outputs.files_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
git commit -m "[skip ci] Update runtime docs and bundle"
|
git commit -m "[skip ci] Update runtime docs and bundle"
|
||||||
|
Loading…
Reference in New Issue
Block a user