Skip to content

Commit

Permalink
fix: I'm gonna bundle myself in a minute if this doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
ChecksumDev committed Jul 18, 2024
1 parent f028bf6 commit 2a2cc20
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 78 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/bundle.yml

This file was deleted.

53 changes: 31 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize

permissions:
contents: write
Expand All @@ -12,6 +16,7 @@ permissions:
jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Expand All @@ -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 }}

0 comments on commit 2a2cc20

Please sign in to comment.