From 2f02c7ac9e98116fc37c44d7cff0946bac75cba9 Mon Sep 17 00:00:00 2001 From: Minor Arrieta Rojas <3359567+marnutux@users.noreply.github.com> Date: Sat, 3 Aug 2024 17:38:00 -0600 Subject: [PATCH] chore(Setup): Adjust githuactions --- .github/workflows/publish.yml | 22 ++++++++++++---------- .github/workflows/release-please.yml | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 837d40e..855324a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,27 +1,29 @@ -name: Publish Package - on: - workflow_dispatch: + push: + branches: [main] + +name: Publish Package 🚀 jobs: build_and_publish: runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@v4 - id: release - with: - release-type: node - uses: actions/checkout@v4 - # these if statements ensure that a publication only occurs when - # a new release is created: + - name: Check if version has been updated + id: check + uses: EndBug/version-check - uses: actions/setup-node@v4 + if: steps.check.outputs.changed == 'true' with: node-version: '20' registry-url: 'https://registry.npmjs.org' # registry-url: 'https://npm.pkg.github.com' scope: '@facturacr' - run: yarn install --frozen-lockfile + if: steps.check.outputs.changed == 'true' - run: yarn build + if: steps.check.outputs.changed == 'true' - run: npm publish + if: steps.check.outputs.changed == 'true' env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 51df5d9..4239500 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -5,7 +5,7 @@ permissions: contents: write pull-requests: write -name: release-please +name: Create Release PR please 🙏 jobs: release-please-pr: