Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit ec89ba3

Browse files
committed
Add a release GHA workflow
1 parent 7355c4c commit ec89ba3

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- '[0-9]*\.[0-9]*\.[0-9]*.*'
6+
7+
name: Upload Release Asset
8+
9+
jobs:
10+
build:
11+
name: Upload Release Asset
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Build extension package
17+
run: |
18+
npm ci
19+
npx vsce package -o rust.vsix
20+
- name: Create Release
21+
id: create_release
22+
uses: actions/create-release@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag_name: ${{ github.ref }}
27+
release_name: Release ${{ github.ref }}
28+
draft: true
29+
prerelease: false
30+
- name: Upload Release Asset
31+
id: upload-release-asset
32+
uses: actions/upload-release-asset@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
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
37+
asset_path: ./rust.vsix
38+
asset_name: rust.vsix
39+
asset_content_type: application/vsix

0 commit comments

Comments
 (0)