Skip to content

Commit 0b77a60

Browse files
authored
Merge pull request #14 from kurone-kito/cumulative-updates
Cumulative updates
2 parents b29100f + 568a1d4 commit 0b77a60

File tree

7 files changed

+57
-49
lines changed

7 files changed

+57
-49
lines changed

.github/workflows/build-listing.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
name: Build Repo Listing
2-
3-
env:
4-
listPublishDirectory: Website
5-
pathToCi: ci
6-
72
on:
83
release:
94
types:
@@ -22,6 +17,7 @@ on:
2217

2318
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
2419
permissions:
20+
actions: write
2521
contents: read
2622
id-token: write
2723
pages: write
@@ -32,14 +28,15 @@ concurrency:
3228
group: pages
3329

3430
jobs:
35-
build:
31+
website:
32+
secrets: inherit
3633
uses: ./.github/workflows/build-website.yml
3734
with:
3835
listPublishDirectory: Website
3936
pathToCi: ci
4037

4138
deploy:
42-
needs: build
39+
needs: website
4340
environment:
4441
name: github-pages
4542
url: ${{ steps.deployment.outputs.page_url }}
@@ -49,6 +46,7 @@ jobs:
4946
uses: actions/download-artifact@v4
5047
with:
5148
name: listing-site
49+
path: Website
5250
- name: Prepare for GitHub Pages deployment
5351
uses: actions/configure-pages@v5
5452
with:
@@ -57,7 +55,7 @@ jobs:
5755
- name: Upload the VPM Listing Website to GitHub Pages artifacts
5856
uses: actions/upload-pages-artifact@v3
5957
with:
60-
path: ${{ env.listPublishDirectory }}
58+
path: Website
6159
- id: deployment
6260
name: Deploy the uploaded VPM Listing Website to GitHub Pages
6361
uses: actions/deploy-pages@v4

.github/workflows/build-website.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@ jobs:
2626
steps:
2727
- name: Checkout Local Repository
2828
uses: actions/checkout@v4
29-
- name: Download package archive
30-
if: inputs.zipFile != ''
31-
uses: actions/download-artifact@v4
32-
with:
33-
name: ${{ inputs.zipFile }}
34-
- name: Download UnityPackage
35-
if: inputs.unityPackage != ''
36-
uses: actions/download-artifact@v4
37-
with:
38-
name: ${{ inputs.unityPackage }}
3929
- name: Checkout Automation Repository without removing prior checkouts
4030
uses: actions/checkout@v4
4131
with:
@@ -51,13 +41,16 @@ jobs:
5141
path: |
5242
${{ inputs.pathToCi }}/.nuke/temp
5343
~/.nuget/packages
44+
restore-keys: |
45+
${{ runner.os }}-
5446
- env:
5547
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5648
name: Build Package Version Listing with Nuke
5749
run: '"${{ inputs.pathToCi }}/build.cmd" BuildRepoListing --root "${{ inputs.pathToCi }}" --list-publish-directory "$GITHUB_WORKSPACE/${{ inputs.listPublishDirectory }}" --current-package-name "${{ vars.PACKAGE_NAME }}"'
5850
- name: Upload listing artifact
5951
uses: actions/upload-artifact@v4
6052
with:
53+
if-no-files-found: error
6154
name: listing-site
6255
path: ${{ inputs.listPublishDirectory }}
6356
retention-days: 1

.github/workflows/package-build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
build:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- name: Checkout Local Repository
23+
uses: actions/checkout@v4
2324
- name: Zip the Package
2425
run: zip -r -9 "${{ github.workspace }}/${{ inputs.zipFile }}" .
2526
working-directory: "${{ inputs.packagePath }}"
@@ -33,12 +34,14 @@ jobs:
3334
- name: Upload package archive
3435
uses: actions/upload-artifact@v4
3536
with:
37+
if-no-files-found: error
3638
name: ${{ inputs.zipFile }}
3739
path: ${{ inputs.zipFile }}
3840
retention-days: 1
3941
- name: Upload UnityPackage
4042
uses: actions/upload-artifact@v4
4143
with:
44+
if-no-files-found: error
4245
name: ${{ inputs.unityPackage }}
4346
path: ${{ inputs.unityPackage }}
4447
retention-days: 1

.github/workflows/push.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
1+
concurrency:
2+
group: ${{ github.workflow }}-${{ github.ref }}
3+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14
name: The CI workflow on push
25
on:
36
push:
47
branches:
58
- '*'
69
- '!main'
7-
permissions:
8-
actions: write
9-
contents: read
10+
pull_request:
1011
jobs:
1112
lint:
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses: actions/checkout@v4
15+
- name: Checkout Local Repository
16+
uses: actions/checkout@v4
1517
- name: Run cspell
1618
uses: streetsidesoftware/cspell-action@v7
1719
- name: Run markdownlint
1820
uses: DavidAnson/markdownlint-cli2-action@v20
1921
package:
22+
permissions:
23+
actions: write
24+
contents: read
25+
secrets: inherit
2026
uses: ./.github/workflows/package-build.yml
2127
with:
2228
packagePath: Packages/${{ vars.PACKAGE_NAME }}
2329
unityPackage: ${{ vars.PACKAGE_NAME }}-feature.unitypackage
2430
zipFile: ${{ vars.PACKAGE_NAME }}-feature.zip
25-
build:
31+
website:
2632
needs: package
33+
permissions:
34+
actions: write
35+
contents: read
2736
uses: ./.github/workflows/build-website.yml
2837
with:
2938
listPublishDirectory: Website

.github/workflows/release.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
concurrency:
2+
group: release-${{ github.ref }}
3+
cancel-in-progress: true
14
name: Build Release
25

36
on:
@@ -21,7 +24,7 @@ jobs:
2124
fi
2225
2326
prepare:
24-
if: needs.config.outputs.config_package == 'true'
27+
if: ${{ needs.config.outputs.config_package == 'true' }}
2528
needs: config
2629
outputs:
2730
stableVersion: ${{ steps.resolve.outputs.stableVersion }}
@@ -30,7 +33,8 @@ jobs:
3033
zipFile: ${{ steps.resolve.outputs.zipFile }}
3134
runs-on: ubuntu-latest
3235
steps:
33-
- uses: actions/checkout@v4
36+
- name: Checkout Local Repository
37+
uses: actions/checkout@v4
3438
- id: version
3539
name: Get the Package version based on the package.json file
3640
# cspell: disable-next-line
@@ -54,24 +58,21 @@ jobs:
5458
echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}.zip" >> $GITHUB_OUTPUT
5559
5660
package:
57-
if: needs.config.outputs.config_package == 'true'
61+
if: ${{ needs.config.outputs.config_package == 'true' }}
5862
needs:
5963
- config
6064
- prepare
65+
secrets: inherit
6166
uses: ./.github/workflows/package-build.yml
6267
with:
6368
packagePath: Packages/${{ vars.PACKAGE_NAME }}
6469
unityPackage: ${{ needs.prepare.outputs.unityPackage }}
6570
zipFile: ${{ needs.prepare.outputs.zipFile }}
6671

67-
build:
72+
release:
6873
env:
6974
packagePath: Packages/${{ vars.PACKAGE_NAME }}
70-
stableVersion: ${{ needs.prepare.outputs.stableVersion }}
71-
unityPackage: ${{ needs.prepare.outputs.unityPackage }}
72-
version: ${{ needs.prepare.outputs.version }}
73-
zipFile: ${{ needs.prepare.outputs.zipFile }}
74-
if: needs.config.outputs.config_package == 'true'
75+
if: ${{ needs.config.outputs.config_package == 'true' }}
7576
needs:
7677
- config
7778
- prepare
@@ -91,38 +92,37 @@ jobs:
9192
- name: Download package archive
9293
uses: actions/download-artifact@v4
9394
with:
94-
name: ${{ env.zipFile }}
95+
name: ${{ needs.prepare.outputs.zipFile }}
9596
- name: Download UnityPackage
9697
uses: actions/download-artifact@v4
9798
with:
98-
name: ${{ env.unityPackage }}
99+
name: ${{ needs.prepare.outputs.unityPackage }}
99100
- name: copy the README and LICENSE files to the Package folder
100101
run: cp README.md LICENSE "${{ env.packagePath }}"
101102
- name: Zip the UnityPackage for release
102-
run: zip -r -9 "${{ env.unityPackage }}.zip" "${{ env.unityPackage }}" LICENSE README.md
103+
run: zip -r -9 "${{ needs.prepare.outputs.unityPackage }}.zip" "${{ needs.prepare.outputs.unityPackage }}" LICENSE README.md
103104
- name: Sign the artifacts
104105
run: |
105-
gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" -ab "${{ env.zipFile }}"
106-
gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" -ab "${{ env.unityPackage }}"
107-
gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" -ab "${{ env.unityPackage }}.zip"
106+
gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" -ab "${{ needs.prepare.outputs.zipFile }}"
107+
gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" -ab "${{ needs.prepare.outputs.unityPackage }}"
108+
gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" -ab "${{ needs.prepare.outputs.unityPackage }}.zip"
108109
- id: tag_version
109110
name: Create a release tag of the version from the package.json file
110111
# cspell: disable-next-line
111112
uses: rickstaa/action-create-tag@v1
112113
with:
113114
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
114115
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
115-
tag: "${{ env.version }}"
116+
tag: "${{ needs.prepare.outputs.version }}"
116117
- name: Publish the Release to GitHub
117118
uses: softprops/action-gh-release@v2
118119
with:
119120
files: |
120-
${{ env.zipFile }}
121-
${{ env.zipFile }}.asc
122-
${{ env.unityPackage }}
123-
${{ env.unityPackage }}.asc
124-
${{ env.unityPackage }}.zip
125-
${{ env.unityPackage }}.zip.asc
121+
${{ needs.prepare.outputs.zipFile }}
122+
${{ needs.prepare.outputs.zipFile }}.asc
123+
${{ needs.prepare.outputs.unityPackage }}.asc
124+
${{ needs.prepare.outputs.unityPackage }}.zip
125+
${{ needs.prepare.outputs.unityPackage }}.zip.asc
126126
${{ env.packagePath }}/package.json
127-
prerelease: ${{ env.stableVersion == '' }}
128-
tag_name: ${{ env.version }}
127+
prerelease: ${{ needs.prepare.outputs.stableVersion == '' }}
128+
tag_name: ${{ needs.prepare.outputs.version }}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ Make sure you are creating a **repository variable**, and not a
7070
- **Name**: `PACKAGE_NAME`
7171
- **Value**: the name of your package, like `com.vrchat.demo-template`.
7272

73+
Workflows triggered by `pull_request` events also read this variable. Pull
74+
requests from forks do not have access to repository variables, so the CI
75+
may fail unless the pull request originates from a branch in the same
76+
repository.
77+
7378
Finally, go to the "Settings" page for your repo, then choose "Pages", and
7479
look for the heading "Build and deployment". Change the "Source" dropdown
7580
from "Deploy from a branch" to "GitHub Actions".

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"rollForward": "latestMinor",
3+
"rollForward": "minor",
44
"version": "8.0.411"
55
}
66
}

0 commit comments

Comments
 (0)