update version and changelog (#178) #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
#name: Release | |
# Controls when the action will run. | |
#on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
#push: | |
# branches: [ main ] | |
#pull_request: | |
# branches: [ main ] | |
name: Create And Upload Release Asset | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- run: npm install | |
#- name: Current NPM Package Version | |
#- uses: justincy/[email protected] | |
# id: info | |
#- run: echo '${{ steps.info.outputs.version }}' | |
- name: Retrieve information from package.json | |
uses: myrotvorets/[email protected] | |
id: ver | |
- uses: lannonbr/vsce-action@master | |
with: | |
args: "package" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ steps.ver.outputs.packageVersion }} Release | |
draft: true | |
prerelease: true | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
#asset_path: ${{ steps.publishOpenVSX.outputs.vsixPath }} # Need to get this version number dynamically | |
asset_path: ./vscode-nushell-lang-${{ steps.ver.outputs.packageVersion }}.vsix # Need to get this version number dynamically | |
asset_name: vscode-nushell-lang-${{ steps.ver.outputs.packageVersion }}.vsix | |
asset_content_type: application/vsix | |
# Note: Probably should publish VS Marketplace first since, OpenVSX is proved working. | |
#- name: Publish to Visual Studio Marketplace | |
# uses: HaaLeo/publish-vscode-extension@v1 | |
# with: | |
# pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
# registryUrl: https://marketplace.visualstudio.com | |
# extensionFile: ${{ steps.publishOpenVSX.outputs.vsixPath }} | |
# Note: This works but you can't unpublish something so if the next thing fails, you're just stuck. | |
- name: Publish to Open VSX Registry | |
uses: HaaLeo/publish-vscode-extension@v1 | |
id: publishOpenVSX | |
with: | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} |