Skip to content

Commit

Permalink
.github/workflows/release: add the publish stage
Browse files Browse the repository at this point in the history
Runs only for stable version release.
Also, made it run only on 'golang/vscode-go' repo.
Tested on my personal repo with the condition adjusted
(if: github.repository == 'golang/vscode-go').

Change-Id: Ibe8cd6c0e469a1ea2c4faedc8ac6c8dfdf60d909
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/240690
Reviewed-by: Rebecca Stambler <[email protected]>
  • Loading branch information
hyangah committed Jul 2, 2020
1 parent d06e933 commit 0cf738e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ name: Release (golang.go)
# the 'Release (golang.go)' workflow specified in this file.
# - For stable version release (vX.X.X), check if the package.json has the matching version.
# - Packaging using 'vsce package'
# - Create a release in Github
# - Create a release in GitHub
# - Upload the vsix file as an asset of the release
# - For stable version release (vX.X.X), upload to the vscode market place
# (not implemented in this CL)

on:
push:
tags:
- v*

jobs:
build:
release:
name: create release
runs-on: ubuntu-latest
if: github.repository == 'golang/vscode-go'

steps:
- name: checkout code
Expand Down Expand Up @@ -95,6 +95,14 @@ jobs:
asset_path: ./go-${{ env.EXT_VERSION }}.vsix
asset_name: go-${{ env.EXT_VERSION }}.vsix
asset_content_type: application/zip

- name: publish
if: env.EXT_ISPREVIEW != 1 && github.repository == 'golang/vscode-go'
uses: lannonbr/vsce-action@704da577da0f27de5cdb4ae018374c2f08b5f523
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}

# TODO: check if the commit is in green state. (test-long.yml results)
# TODO: publish to the market if VERSION is for a stable version.
# TODO: after publishing, create a gerrit CL to update 'latest' branch if VERSION is for a stable version.

0 comments on commit 0cf738e

Please sign in to comment.