diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index bf500d1..19f21b0 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -33,7 +33,7 @@ jobs: with: node-version: ${{ matrix.node }} - - name: 📥 Download deps + - name: 📥 Install deps run: npm ci - name: 🏗 Build @@ -50,9 +50,8 @@ jobs: dry_run: true ci: false extra_plugins: | - @semantic-release/changelog@6.0.3 - @semantic-release/git@10.0.1 - @semantic-release/github@9.0.5 + @semantic-release/changelog + @semantic-release/git branches: | [ 'main', diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index d3f98c7..112d40f 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -4,56 +4,36 @@ on: push: branches: - main + - beta jobs: - Test: - name: 🚨 Test 🚨 + Publish: + name: 🚀 Publish 🚀 runs-on: ${{ matrix.os }} strategy: matrix: node: [18] os: [ubuntu-latest] + if: ${{ github.ref == 'refs/heads/main' }} + steps: - - uses: actions/checkout@v4 + - name: ⬇️ Checkout repo + uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false - - name: Setup Node.js ${{ matrix.node }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - cache: "npm" - - - run: npm install - - run: npm run build - - run: npm run format - - Publish: - name: 🚀 Publish 🚀 - runs-on: ${{ matrix.os }} - strategy: - matrix: - node: [18] - os: [ubuntu-latest] - if: ${{ github.ref == 'refs/heads/main' }} - needs: [Test] - steps: - name: ⎔ Setup node ${{ matrix.node }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - name: 📥 Download deps - uses: bahmutov/npm-install@v1 - with: - useLockFile: false - env: - HUSKY_SKIP_INSTALL: true + - name: 📥 Install deps + run: npm ci - name: 🏗 Build - run: npm run build + run: npm run build --if-present - name: 🚨 Format run: npm run format @@ -64,9 +44,8 @@ jobs: with: semantic_version: 18 extra_plugins: | - @semantic-release/changelog@6.0.3 - @semantic-release/git@10.0.1 - @semantic-release/github@9.0.5 + @semantic-release/changelog + @semantic-release/git branches: | [ 'main', @@ -75,6 +54,7 @@ jobs: {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true} ] + env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}