From 8b91ac9a76d6f612699a4fb781dc6ea7dd18e6ba Mon Sep 17 00:00:00 2001 From: ImLunaHey <105922175+ImLunaHey@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:34:51 +0930 Subject: [PATCH] chore: fix github actions not adding tgz --- .github/workflows/ci.yml | 55 +++++++++++----------------------------- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85020ce..f8403ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,16 +33,23 @@ jobs: permissions: contents: write - outputs: - current_tag: ${{ steps.current_tag.outputs.current_tag }} - previous_tag: ${{ steps.previous_tag.outputs.previous_tag }} - steps: - name: Checkout repo uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Install bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + registry-url: 'https://registry.npmjs.org' + - name: Set git email run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" @@ -65,45 +72,13 @@ jobs: - name: Push changes run: git push --follow-tags origin main - release: - # DO NOT RUN ON PR - if: github.event_name != 'pull_request' - needs: bump_version - runs-on: ubuntu-latest - - permissions: - contents: write - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 'lts/*' - registry-url: 'https://registry.npmjs.org' - - - name: Install packages - run: bun i - - - name: Build library and CLI - run: bun run build - - name: Generate CHANGELOG for Github release id: changelog uses: requarks/changelog-action@v1 with: token: ${{ github.token }} - fromTag: ${{ needs.bump_version.outputs.current_tag }} - toTag: ${{ needs.bump_version.outputs.previous_tag }} + fromTag: ${{ steps.current_tag.outputs.current_tag }} + toTag: ${{ steps.previous_tag.outputs.previous_tag }} writeToFile: false - name: Publish to NPM @@ -117,8 +92,8 @@ jobs: allowUpdates: true draft: false makeLatest: true - tag: ${{ needs.bump_version.outputs.current_tag }} - name: ${{ needs.bump_version.outputs.current_tag }} + tag: ${{ steps.current_tag.outputs.current_tag }} + name: ${{ steps.current_tag.outputs.current_tag }} body: ${{ steps.changelog.outputs.changes }} token: ${{ github.token }} artifacts: '*.tgz'