From 038a07de7a0a1cd5485e981d06df9f97b1b44a4e Mon Sep 17 00:00:00 2001 From: Omar Jaroudi <30807936+OmarJaroudi@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:06:45 +0000 Subject: [PATCH] ci: update actions --- .github/workflows/ci.yaml | 12 +++++++----- .github/workflows/release.yaml | 29 ++++++++++++++++------------- .releaserc.json | 2 +- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c864b97..35413e9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,16 +1,18 @@ name: CI on: + workflow_dispatch: + pull_request: push: - + branches: [main] jobs: release-notes: name: Release notes preview runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' + if: github.event_name == 'pull_request' steps: - - uses: open-turo/actions-release/release-notes-preview@v2 + - uses: open-turo/actions-release/lint-release-notes@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} env: @@ -20,10 +22,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: open-turo/action-pre-commit@v1 + - uses: open-turo/action-pre-commit@v3 test: name: Test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d19fe4e..9120f89 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,20 +1,23 @@ name: Release -# Only release when we merge to main + on: push: - branches: [main, "[0-9]+.x"] - workflow_dispatch: # enable manual release - -# Handle release versioning automatically with semantic release + branches: [main, "v*"] + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: - semantic-release: + release: name: Release - runs-on: ubuntu-latest + runs-on: [self-hosted, general-ubuntu] + env: + NODE_MODULES_CACHE_BUCKET_NAME: core-servi-github-actions-build-cach20240118162152102700000001 + NODE_MODULES_CACHE_BUCKET_REGION: us-east-1 steps: - - name: Checkout - uses: actions/checkout@v3 - - uses: open-turo/actions-release/semantic-release@v2 + - uses: open-turo/actions-node/release@v6 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - extra-plugins: | - @open-turo/semantic-release-config + github-token: ${{ secrets.TURO_GITHUB_TOKEN }} + npm-auth-token: ${{ secrets.ARTIFACTORY_NPM_AUTH_TOKEN }} + s3-bucket-name: ${{ env.NODE_MODULES_CACHE_BUCKET_NAME }} + s3-bucket-region: ${{ env.NODE_MODULES_CACHE_BUCKET_REGION }} diff --git a/.releaserc.json b/.releaserc.json index db57aea..759eb40 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,3 +1,3 @@ { - "extends": "@open-turo/semantic-release-config" + "extends": "@open-turo/semantic-release-config/lib/npm" }