Skip to content

Commit

Permalink
chore: add gh release auto
Browse files Browse the repository at this point in the history
  • Loading branch information
y3owk1n committed Dec 1, 2024
1 parent 3d6bc98 commit 4236fe0
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 73 deletions.
50 changes: 49 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,59 @@ 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
# `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
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
24 changes: 24 additions & 0 deletions .github/workflows/release-please.yml.bak
Original file line number Diff line number Diff line change
@@ -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
72 changes: 0 additions & 72 deletions .github/workflows/release-please.yml.example

This file was deleted.

File renamed without changes.

0 comments on commit 4236fe0

Please sign in to comment.