Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_call:

permissions:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '31 7 * * 3'
workflow_call:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_call:

permissions:
Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,34 @@ on:
- 'v*.*.*'

permissions:
actions: read
checks: write
contents: read
packages: read
security-events: write
statuses: write

jobs:
check-dist:
uses: ./.github/workflows/check-dist.yml
codeql-analysis:
uses: ./.github/workflows/codeql-analysis.yml
lint:
uses: ./.github/workflows/linter.yml
ci:
uses: ./.github/workflows/ci.yml
check-main:
name: Verify tag is on main
runs-on: ubuntu-latest
outputs:
on_main: ${{ steps.check.outputs.on_main }}
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Check ancestry
id: check
run: |
git fetch origin main
if git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "on_main=true" >> "$GITHUB_OUTPUT"
else
echo "on_main=false" >> "$GITHUB_OUTPUT"
echo "::notice::Tag is not on main — skipping release."
fi

release:
needs: [check-dist, codeql-analysis, lint, ci]
needs: check-main
if: needs.check-main.outputs.on_main == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
Loading