diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 154ffc5..e71d263 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: googleapis/release-please-action@v4 + id: release with: # this assumes that you have created a personal access token # (PAT) and configured it as a GitHub action secret named @@ -21,4 +22,51 @@ jobs: token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} # this is a built-in strategy in release-please, see "Action Inputs" # for more options - release-type: simple + release-type: node + + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.head_ref }} + + - name: Install Just + if: ${{ steps.release.outputs.release_created }} + uses: extractions/setup-just@v1 + + - uses: pnpm/action-setup@v4 + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v4 + if: ${{ steps.release.outputs.release_created }} + with: + node-version: 22 + cache: "pnpm" + + - uses: oven-sh/setup-bun@v2 + if: ${{ steps.release.outputs.release_created }} + with: + bun-version: latest + + - uses: actions/cache@v4 + if: ${{ steps.release.outputs.release_created }} + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + + - shell: bash + if: ${{ steps.release.outputs.release_created }} + run: pnpm install + + - name: Build project and prepare release artifact + if: ${{ steps.release.outputs.release_created }} + run: just compile + + - name: Upload Release Artifact + if: ${{ steps.release.outputs.release_created }} + env: + GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} + run: | + gh release upload ${{ steps.release.outputs.tag_name }} ./compile/cpenv-darwin-arm64 + gh release upload ${{ steps.release.outputs.tag_name }} ./compile/cpenv-darwin-x64 diff --git a/.github/workflows/release-please.yml.bak b/.github/workflows/release-please.yml.bak new file mode 100644 index 0000000..154ffc5 --- /dev/null +++ b/.github/workflows/release-please.yml.bak @@ -0,0 +1,24 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + # this assumes that you have created a personal access token + # (PAT) and configured it as a GitHub action secret named + # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). + token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} + # this is a built-in strategy in release-please, see "Action Inputs" + # for more options + release-type: simple diff --git a/.github/workflows/release-please.yml.example b/.github/workflows/release-please.yml.example deleted file mode 100644 index e71d263..0000000 --- a/.github/workflows/release-please.yml.example +++ /dev/null @@ -1,72 +0,0 @@ -on: - push: - branches: - - main - -permissions: - contents: write - pull-requests: write - -name: release-please - -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: googleapis/release-please-action@v4 - id: release - with: - # this assumes that you have created a personal access token - # (PAT) and configured it as a GitHub action secret named - # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). - token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} - # this is a built-in strategy in release-please, see "Action Inputs" - # for more options - release-type: node - - - uses: actions/checkout@v4 - if: ${{ steps.release.outputs.release_created }} - with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.head_ref }} - - - name: Install Just - if: ${{ steps.release.outputs.release_created }} - uses: extractions/setup-just@v1 - - - uses: pnpm/action-setup@v4 - if: ${{ steps.release.outputs.release_created }} - - uses: actions/setup-node@v4 - if: ${{ steps.release.outputs.release_created }} - with: - node-version: 22 - cache: "pnpm" - - - uses: oven-sh/setup-bun@v2 - if: ${{ steps.release.outputs.release_created }} - with: - bun-version: latest - - - uses: actions/cache@v4 - if: ${{ steps.release.outputs.release_created }} - with: - path: .turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - - - shell: bash - if: ${{ steps.release.outputs.release_created }} - run: pnpm install - - - name: Build project and prepare release artifact - if: ${{ steps.release.outputs.release_created }} - run: just compile - - - name: Upload Release Artifact - if: ${{ steps.release.outputs.release_created }} - env: - GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} - run: | - gh release upload ${{ steps.release.outputs.tag_name }} ./compile/cpenv-darwin-arm64 - gh release upload ${{ steps.release.outputs.tag_name }} ./compile/cpenv-darwin-x64 diff --git a/.github/workflows/test.yml.example b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/test.yml.example rename to .github/workflows/test.yml