From 39f15601ee6d0f5d1c4aacda76e4ae7f206e5572 Mon Sep 17 00:00:00 2001 From: suu3 Date: Sat, 7 Dec 2024 21:51:35 +0900 Subject: [PATCH] [chore] test --- .github/workflows/deploy.yml | 9 --------- .github/workflows/release.yml | 28 +++++++++++++++++++++------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7236992d..f6301e5d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,12 +28,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} PUBLISH_BRANCH: deploy PUBLISH_DIR: ./public - - name: Create tag - run: | - VERSION=$(jq -r '.version' < package.json) - git config --global user.email "dev.suu3@gmail.com" - git config --global user.name "suu3" - git tag -a "v$VERSION" -m "Release v$VERSION" - git push origin main --tags - env: - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30cfaf96..24923552 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,27 +1,41 @@ name: Create release on: push: - tags: - - "v*" + branches: + - main permissions: contents: write jobs: release: - name: Release pushed tag + name: Create Release Pull Request or Publish to npm runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Create Release Pull Request or Publish + uses: changesets/action@v1 + with: + # Expects a script called release that builds the packages and calls changeset publish + publish: pnpm changeset tag + version: pnpm changeset version + env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + release-tag: + name: Release pushed tag + runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v3 - - name: Create release + - name: Create GitHub Release env: VERSION: ${{ github.ref_name }} GH_TOKEN: ${{ github.token }} run: | gh release create "$VERSION" \ --repo="$GITHUB_REPOSITORY" \ - --title="${tag#v}" \ + --title="${VERSION#v}" \ --generate-notes