Skip to content

Commit 41ab650

Browse files
committed
project: Add dependents update.
1 parent a471270 commit 41ab650

File tree

2 files changed

+43
-6
lines changed

2 files changed

+43
-6
lines changed

.github/workflows/dependents.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Dependents
2+
on:
3+
workflow_run:
4+
workflows: [ "Publish" ]
5+
branches: [ master ]
6+
types:
7+
- completed
8+
9+
jobs:
10+
VisualPinball-Unity-AssetLibrary-Hdrp:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'workflow_run' }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
path: VisualPinball.AssetLibrary
17+
- name: Checkout VisualPinball.Unity.AssetLibrary.Hdrp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: VisualPinball/VisualPinball.Unity.AssetLibrary.Hdrp
21+
path: VisualPinball.Unity.AssetLibrary.Hdrp
22+
token: ${{ secrets.GH_PAT }}
23+
- name: Update Dependent
24+
id: updateDependent
25+
uses: VisualPinball/[email protected]
26+
with:
27+
source: VisualPinball.AssetLibrary
28+
dependent: VisualPinball.Unity.AssetLibrary.Hdrp
29+
- name: Commit
30+
if: ${{ steps.updateDependent.outputs.isBump == 'true' }}
31+
run: |
32+
cd VisualPinball.Unity.AssetLibrary.Hdrp
33+
git config user.name "github-actions"
34+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
35+
git add package.json
36+
git commit -m "chore(deps): Update ${{ steps.updateDependent.outputs.sourceName }} to ${{ steps.updateDependent.outputs.sourceVersion }}."
37+
git push

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ jobs:
1818
if: ${{ steps.nextVersion.outputs.isBump == 'true' }}
1919
run: |
2020
npm version ${{ steps.nextVersion.outputs.nextVersion }} --no-git-tag-version
21-
- name: Publish
22-
run: |
23-
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
24-
npm publish
25-
env:
26-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2721
- name: Commit
2822
id: commit
2923
if: ${{ steps.nextVersion.outputs.isBump == 'true' }}
@@ -46,4 +40,10 @@ jobs:
4640
commitish: ${{ steps.commit.outputs.commitish }}
4741
env:
4842
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
- name: Publish
44+
run: |
45+
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
46+
npm publish
47+
env:
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4949

0 commit comments

Comments
 (0)