Skip to content

Commit

Permalink
Add GitHub Actions for linting/release (#5)
Browse files Browse the repository at this point in the history
Setup GitHub actions for linting and release workflows.
  • Loading branch information
johnallen3d authored Dec 22, 2021
1 parent 7f49ac8 commit 27f9375
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull Request related actions

on:
push:
pull_request:

jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12

- name: Install dependencies
run: yarn install

- name: Run lint task
run: yarn lint
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release
on:
push:
tags:
- v*
jobs:
release:
name: Release to VS Code Marketplace
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- run: yarn install

- uses: lannonbr/[email protected]
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
13 changes: 10 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@

Steps to release new version.

## Prepare and Merge Release Pull Request

Create a pull request to represent a new release.

1. Commit latest changes/fixes
1. Update version number in `./package.json`
1. Update `./CHANGELOG.md`
1. Commit changes following commit title convention: `Bump vscode-cue-fmt from 0.0.1 to 0.0.2`

## Trigge a Release to VS Code Marketplace

After the release PR has been merged, push version tag to trigger the release action on GitHub.

1. Tag release commit: `git tag -m "v0.0.1" -a "v0.0.1"`
1. Push changes: `git push && git push --tags`
1. Package extension: `vsce package`
1. Publish extension: `vsce publish`
1. Push changes: `git push --tags`
1. ...wait, it takes a couple of minutes for change to be available in Marketplace

0 comments on commit 27f9375

Please sign in to comment.