-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (72 loc) · 2.35 KB
/
release.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Deploy Extension
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetching tags
run: git fetch --tags -f || true
- name: Setup yarn
run: yarn install
# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
cache: gradle
- name: Generate Changelog
id: generate_changelog
run: |
changelog=$(yarn run changelog:last --silent)
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
echo -e "set-output name=changelog::${changelog-<empty>}\n"
echo -e "::set-output name=changelog::${changelog}\n"
- name: Package extension
uses: lannonbr/vsce-action@master
with:
args: 'package -o idux-coder.vsix '
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.generate_changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Publish in vscode marketplace
uses: lannonbr/vsce-action@master
with:
args: 'publish -p $VSCE_TOKEN'
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
- name: Publish in jetbrains marketplace
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
run: ./gradlew publishPlugin
- name: Upload Release Asset (vscode)
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./idux-coder.vsix
asset_name: idux-coder.vsix
asset_content_type: application/zip
- name: Upload Release Asset (webstorm)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.create_release.outputs.upload_url }} ./build/distributions/*