diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 0dcbf4b..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Publish - -permissions: - contents: write - -on: - release: - types: [released, edited] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ github.event.release.tag_name }} - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: "latest" - cache: "npm" - - - name: Install modules and build - run: npm ci && npm run build - - - uses: JasonEtco/build-and-tag-action@v2 - env: - GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/changesets.yml b/.github/workflows/release.yml similarity index 80% rename from .github/workflows/changesets.yml rename to .github/workflows/release.yml index 4f07246..1a79443 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/release.yml @@ -38,3 +38,9 @@ jobs: publish: npx changeset tag env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Tag & Release Action + if: steps.changesets.outputs.published == 'true' + uses: JasonEtco/build-and-tag-action@v2 + env: + GITHUB_TOKEN: ${{ github.token }}