From c517f41605635680a8a32f5f1ac8ae8ce84c89a3 Mon Sep 17 00:00:00 2001 From: Sean Trane Date: Tue, 11 Apr 2023 16:54:14 -0400 Subject: [PATCH] ci: use shared semantic-release workflow --- .github/workflows/delivery.yml | 65 +++++-------------------------- .github/workflows/integration.yml | 3 +- .github/workflows/maintenance.yml | 5 +-- 3 files changed, 12 insertions(+), 61 deletions(-) diff --git a/.github/workflows/delivery.yml b/.github/workflows/delivery.yml index 04b2bc6..b706441 100644 --- a/.github/workflows/delivery.yml +++ b/.github/workflows/delivery.yml @@ -10,62 +10,15 @@ concurrency: cancel-in-progress: true permissions: - contents: read + contents: write + id-token: write + issues: write + discussions: write + packages: write + pull-requests: write jobs: release: - name: Semantic Release - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - issues: write - discussions: write - packages: write - pull-requests: write - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - token: ${{ secrets.GH_PAT }} - fetch-depth: 0 - - # https://github.com/marketplace/actions/semantic-release-action#usage - - name: Semantic Release - uses: docker://ghcr.io/codfish/semantic-release-action:v2 - id: semantic - env: - GITHUB_TOKEN: ${{ secrets.GH_PAT }} - with: - tag_format: 'v${version}' - additional_packages: | - [ - '@semantic-release/changelog', - '@semantic-release/git' - ] - plugins: | - [ - '@semantic-release/commit-analyzer', - '@semantic-release/release-notes-generator', - ['@semantic-release/changelog', {changelogTitle: '# CHANGELOG'}], - '@semantic-release/github', - '@semantic-release/git' - ] - # specify default branches to add support for the `main` branch - # which semantic-release doesn't have as a default yet. - branches: | - [ - '+([0-9])?(.{+([0-9]),x}).x', - 'releases/+([0-9])?(.{+([0-9]),x}).x', - 'main', - 'next', - 'next-major', - { - name: 'beta', - prerelease: true - }, - { - name: 'alpha', - prerelease: true - } - ] + uses: seantrane/engineering/.github/workflows/semantic-release.yml@main + secrets: + token: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 26b8c0d..11fb07b 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -7,8 +7,7 @@ on: push: branches: [main] paths: - - '.github/workflows/integration.yml' - - '.github/workflows/linter.yml' + - .github/workflows/integration.yml workflow_dispatch: concurrency: diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml index 3989d1a..0615567 100644 --- a/.github/workflows/maintenance.yml +++ b/.github/workflows/maintenance.yml @@ -7,9 +7,8 @@ on: push: branches: [main] paths: - - .github/labels.json - - .github/workflows/label-sync.yml - - .github/workflows/labels.yml + - labels.json + - .github/workflows/maintenance.yml workflow_dispatch: concurrency: