-
Notifications
You must be signed in to change notification settings - Fork 11
60 lines (49 loc) · 1.63 KB
/
prerelease.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
name: Pre-release VSIX
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
jobs:
publish-vsix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SOURCERY_RELEASE_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: latest
- run: yarn install --frozen-lockfile
- name: Update binaries
run: |
./download-binaries.sh ${{ github.event.inputs.version }}
- name: Package VSCode extension
run: yarn run vsce package
- name: Rename packaged VSIX file
run: mv sourcery-*.vsix sourcery-${{ github.event.inputs.version }}.vsix
- name: Upload archive
uses: actions/upload-artifact@v3
with:
path: sourcery-${{ github.event.inputs.version }}.vsix
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: v${{ github.event.inputs.version }}
name: Sourcery ${{ github.event.inputs.version }}
body: v${{ github.event.inputs.version }}
prerelease: true
artifacts: sourcery-${{ github.event.inputs.version }}.vsix
artifactContentType: raw
artifactErrorsFailBuild: true
token: ${{ secrets.SOURCERY_RELEASE_TOKEN }}
- name: Notify Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: Publish VS Code extension pre-release v${{ github.event.inputs.version }} - ${{ job.status }}
fields: repo,commit,workflow,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASES_WEBHOOK_URL }}
if: always()