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

Release Automation #15

Merged
merged 3 commits into from
Mar 15, 2022
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
25 changes: 25 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
changelog:
categories:
- title: NOTES
labels:
- note
- documentation
- title: FEATURES
labels:
- feature
- title: ENHANCEMENTS
labels:
- enhancement
- title: BUG FIXES
labels:
- bug
- title: INTERNAL
labels:
- dependencies
- "*"
exclude:
labels:
- duplicate
- wontfix
- question
- invalid
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish release

permissions:
contents: write # for creating a release and uploading release artifacts

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
release:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: GH Release
run: |
gh release create "${GITHUB_REF#refs/tags/}" ./syntaxes/*.json --generate-notes
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
33 changes: 33 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Release

This project produces GitHub Releases as the versioned artifacts for use in products like the Terraform VS Code Extension.

For example, you can download the `v0.2.3` Terraform Syntax release from `https://github.com/hashicorp/syntax/releases/download/v0.2.3/terraform.tmGrammar.json`

## Publish Release

## Increment Version

1. Ensure that `CHANGELOG.md` has all changes since last release. Add if any are missing.
1. Increment `version` in package.json
1. Commit changes
1. Open PR
1. Team reviews and merges PR

## Create Release

The Release GitHub Action will package the release for public consumption.

To trigger a release, create a tag and push to the hashicorp/syntax repo:

1. On the `main` branch create a new tag by running the following with the correct version:

```
git tag -a v0.1.0 -m "v0.1.0"
```

2. Then push the tag to the repo to trigger the automation:

```
git push --tags
```