This repository was archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
52 lines (49 loc) · 1.73 KB
/
release.yml
File metadata and controls
52 lines (49 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release new version
on:
workflow_dispatch:
inputs:
version:
required: true
description: 'Version to bump `package.json` to (format: x.y.z)'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git config --global user.email "[email protected]"
git config --global user.name "Christopher Schleiden"
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm version ${{ github.event.inputs.version }}
- run: npm install
- run: npm run package
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'release-v${{ github.event.inputs.version }}'
release_name: 'v${{ github.event.inputs.version }}'
draft: false
prerelease: false
- 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 }}
asset_path: ./vscode-github-actions-${{ github.event.inputs.version }}.vsix
asset_name: vscode-github-actions-${{ github.event.inputs.version }}.vsix
asset_content_type: application/vsix
- name: Publish to marketplace
uses: HaaLeo/publish-vscode-extension@v0
with:
pat: ${{ secrets.PUBLISHER_KEY }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ./vscode-github-actions-${{ github.event.inputs.version }}.vsix
packagePath: ''
- run: git push