Skip to content

Commit 2d642fd

Browse files
authored
Merge pull request #12 from fdncred/main
add release pipeline
2 parents 4cb5d9e + 30ed326 commit 2d642fd

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
#name: Release
4+
5+
# Controls when the action will run.
6+
#on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
#push:
9+
# branches: [ main ]
10+
#pull_request:
11+
# branches: [ main ]
12+
13+
14+
name: Create And Upload Release Asset
15+
16+
on:
17+
push:
18+
# Sequence of patterns matched against refs/tags
19+
tags:
20+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
21+
22+
# Allows you to run this workflow manually from the Actions tab
23+
workflow_dispatch:
24+
25+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
26+
jobs:
27+
# This workflow contains a single job called "build"
28+
build:
29+
# The type of runner that the job will run on
30+
runs-on: ubuntu-latest
31+
32+
# Steps represent a sequence of tasks that will be executed as part of the job
33+
steps:
34+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
35+
- uses: actions/checkout@v2
36+
- run: npm install
37+
- uses: lannonbr/vsce-action@master
38+
with:
39+
args: "package"
40+
- name: Create Release
41+
id: create_release
42+
uses: actions/create-release@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
tag_name: ${{ github.ref }}
47+
release_name: Release ${{ github.ref }}
48+
draft: true
49+
prerelease: false
50+
- name: Upload Release Asset
51+
id: upload-release-asset
52+
uses: actions/upload-release-asset@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
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
57+
asset_path: ./vscode-nushell-lang-0.0.5.vsix # Need to get this version number dynamically
58+
asset_name: vscode-nushell-lang-0.0.5.vsix
59+
asset_content_type: application/vsix

0 commit comments

Comments
 (0)