diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml deleted file mode 100644 index b8a31f0..0000000 --- a/.github/workflows/prerelease.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Pre-release -on: - push: - branches: [ next, prerelease ] - -jobs: - prerelease: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.npm - key: cache-node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} - - name: Install dependencies - run: npm ci - - - name: Build the CLI - run: npm run build - - name: Run npm release - run: npm run release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GIT_AUTHOR_NAME: Tolgee Machine - GIT_AUTHOR_EMAIL: machine@tolgee.io - GIT_COMMITTER_NAME: Tolgee Machine - GIT_COMMITTER_EMAIL: machine@tolgee.io diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e36dac6..de481a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,8 @@ on: branches: [ main ] types: - completed + push: + branches: [ next, prerelease ] # This part sets up the Trusted Publishers for npm via GitHub Actions, # that's why we don't need to set up the token manually @@ -16,15 +18,14 @@ permissions: jobs: release: - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'push' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 22 - - - run: install -g npm@^11.5.1 + node-version: '24' + registry-url: 'https://registry.npmjs.org' - name: Cache dependencies uses: actions/cache@v4