-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: I'm gonna bundle myself in a minute if this doesn't work
- Loading branch information
1 parent
f028bf6
commit 2a2cc20
Showing
2 changed files
with
31 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,10 @@ on: | |
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
permissions: | ||
contents: write | ||
|
@@ -12,6 +16,7 @@ permissions: | |
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -28,50 +33,54 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-bun- | ||
- uses: oven-sh/setup-bun@v1 | ||
- name: Set up Bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Install dependencies | ||
run: | | ||
bun install | ||
run: bun install | ||
|
||
- name: Trigger Bundle Update | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
await github.actions.createWorkflowDispatch({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
workflow_id: 'Bundle Update.yml', | ||
ref: context.ref | ||
}); | ||
- name: Wait for Bundle Update | ||
uses: jakejarvis/wait-action@v1 | ||
with: | ||
workflow: "Bundle Update" | ||
ref: ${{ github.sha }} | ||
repo: ${{ github.repository }} | ||
- name: Run bundle | ||
run: bun run bundle | ||
|
||
- name: Commit bundle results | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "BeatForge CI" | ||
git add . | ||
git commit -m "chore: bundle update" | ||
git push origin HEAD:${{ github.event.pull_request.head.ref }} | ||
- uses: google-github-actions/release-please-action@v3 | ||
- name: Release Please | ||
uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
if: github.event_name == 'push' | ||
with: | ||
token: ${{ secrets.RELEASE_GITHUB_TOKEN }} | ||
package-name: "init-beatsaber" | ||
release-type: node | ||
|
||
- name: Tag and push subversions | ||
if: ${{ steps.release.outputs.releases_created }} | ||
if: github.event_name == 'push' && steps.release.outputs.releases_created | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "BeatForge CI" | ||
git fetch --tags | ||
# Delete local tags if they exist | ||
git tag -d v${{ steps.release.outputs.major }} || true | ||
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | ||
# Delete remote tags if they exist | ||
git push origin :v${{ steps.release.outputs.major }} || true | ||
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | ||
# Create new tags | ||
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" | ||
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" | ||
# Push new tags | ||
git push origin v${{ steps.release.outputs.major }} | ||
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} |