Skip to content
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
schedule:
- cron: '0 7 * * 2'
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest

permissions:
checks: read
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check that the CI is passing
uses: actions/github-script@v7
with:
script: |
const checks = await github.rest.checks.listForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: '${{github.event.repository.default_branch}}',
});

const isSuccessful = checks.data.check_runs
.filter((run) => run.name !== process.env.GITHUB_JOB)
.every((run) => run.conclusion === 'success');

if (!isSuccessful) {
core.error('Not creating a release because the CI is failing.');
process.exit(1);
}

- name: Update git tag
uses: EndBug/latest-tag@latest
with:
ref: latest
Loading