5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-21 19:39:29 +08:00

Allow manual publishing of the npm package

This commit is contained in:
Fabio Massaioli 2025-02-25 17:03:09 +01:00
parent 746b38abe5
commit 5436ebee71

View File

@ -1,6 +1,7 @@
on:
push:
branches: ['v3-alpha']
workflow_dispatch:
jobs:
publish:
@ -54,14 +55,14 @@ jobs:
v3/internal/runtime/desktop/@wailsio/runtime/types/**
- 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
working-directory: v3/internal/runtime/desktop/@wailsio/runtime
run: |
echo "version=$(npm version prerelease)" >> $GITHUB_OUTPUT
- 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: |
git add .
git commit -m "[skip ci] Publish @wailsio/runtime ${{ steps.bump-version.outputs.version }}"
@ -69,14 +70,14 @@ jobs:
- name: Publish npm package
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:
package: v3/internal/runtime/desktop/@wailsio/runtime
access: public
token: ${{ secrets.NPM_TOKEN }}
- 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
id: docs-bundle-changes
with:
@ -85,7 +86,7 @@ jobs:
v3/internal/runtime/desktop/@wailsio/runtime/docs/**
- 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: |
git add .
git commit -m "[skip ci] Update runtime docs and bundle"