Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: validate tag format during release #906

Merged
merged 1 commit into from Dec 20, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -3,8 +3,20 @@ on:
release:
types: [published]
jobs:
validate-tag:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-regex-match@v2
id: tag-match
with:
text: ${{ github.event.release.tag_name }}
regex: '^\d+\.\d+\.\d+$'
- run: echo "Please create tag for release with format like 4.0.1" && exit 1
if: ${{ steps.tag-match.outputs.match == '' }}

# Build package and publish a prerelease
prerelease:
needs: validate-tag
permissions:
id-token: write
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -74,9 +74,9 @@ Both packages [checkly](https://www.npmjs.com/package/checkly) and [create-cli](

To release packages to NPM:

1. Publish a Github Release with a valid tag `v#.#.#` and click the `Generate release notes` button to auto-generate notes following format defined [here](https://github.com/checkly/checkly-cli/blob/main/.github/release.yml)
2. When release is published the Github action is triggered. It builds and publishes `v#.#.#-prerelease` prereleases (for both packages).
3. A `production` deployment will be waiting for approval. After it's approved, the `v#.#.#` version will be published and set as `latest`
1. Publish a Github Release with a valid tag `#.#.#` and click the `Generate release notes` button to auto-generate notes following format defined [here](https://github.com/checkly/checkly-cli/blob/main/.github/release.yml)
2. When release is published the Github action is triggered. It builds and publishes `#.#.#-prerelease` prereleases (for both packages).
3. A `production` deployment will be waiting for approval. After it's approved, the `#.#.#` version will be published and set as `latest`

## Style Guide

Expand Down