From a11b31bb3ea3ba98ef21255e19bd473eca3ab215 Mon Sep 17 00:00:00 2001 From: Dom Webber Date: Sat, 16 Dec 2023 12:10:46 +0000 Subject: [PATCH] ci: return release workflows to main.yml --- .github/workflows/main.yml | 26 +++++++++++++++++++---- .github/workflows/pull-request.yml | 11 ---------- .github/workflows/release.yml | 34 ------------------------------ 3 files changed, 22 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bda13ac..81be874 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,12 +29,30 @@ jobs: os: ubuntu-latest release: - uses: ./.github/workflows/release.yml - needs: - - test-ubuntu - - lint + name: Release + runs-on: ubuntu-latest permissions: contents: write # to be able to publish a GitHub release issues: write # to be able to comment on released issues pull-requests: write # to be able to comment on released pull requests id-token: write # to enable use of OIDC for npm provenance + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + persist-credentials: false + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: npm + - run: npm ci --prefer-offline --no-audit --no-fund + - run: npm audit signatures + - uses: changesets/action@v1 + with: + publish: npm run release + title: "chore(release): version packages" + commit: "chore(release): version packages" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 73d65bf..de1ed5d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -28,14 +28,3 @@ jobs: needs: prepare-npm-cache-ubuntu with: os: ubuntu-latest - - release: - uses: ./.github/workflows/release.yml - needs: - - test-ubuntu - - lint - permissions: - contents: write # to be able to publish a GitHub release - issues: write # to be able to comment on released issues - pull-requests: write # to be able to comment on released pull requests - id-token: write # to enable use of OIDC for npm provenance diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9226438..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release - -on: - workflow_call: - -jobs: - release: - name: Release - runs-on: ubuntu-latest - permissions: - contents: write # to be able to publish a GitHub release - issues: write # to be able to comment on released issues - pull-requests: write # to be able to comment on released pull requests - id-token: write # to enable use of OIDC for npm provenance - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - persist-credentials: false - - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: npm - - run: npm ci --prefer-offline --no-audit --no-fund - - run: npm audit signatures - - uses: changesets/action@v1 - with: - publish: npm run release - title: "chore(release): version packages" - commit: "chore(release): version packages" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }}