-
Notifications
You must be signed in to change notification settings - Fork 16
114 lines (84 loc) · 3.68 KB
/
art.yaml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: "art"
on:
workflow_dispatch:
env:
NODE_VERSION: 14.x
jobs:
package-release-publish:
runs-on: ubuntu-latest
environment: publishing
name: Package-Release-Publish
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: setup node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: install node deps
run: npm ci
- name: capture latest release notes
run: |
echo "RELEASE_NOTE<<EOF" >> $GITHUB_ENV
echo "$(node src/scripts/changelog.js)" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "See [CHANGE LOG](https://github.com/f5devcentral/vscode-f5/blob/main/README.md) for full details and history." >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# run: node src/scripts/changelog.js >> releaseNote.txt
- name: display release notes
run: echo "${{ env.RELEASE_NOTE }}"
# - name: append release note reference
# run: echo "See [CHANGE LOG](https://github.com/f5devcentral/vscode-f5/blob/main/README.md) for full details." >> releaseNote.txt
# - name: package extension
# run: vsce package
# - name: get extension path
# run: echo "VSIX_PATH=$(find . -maxdepth 1 -type f -iname "*.vsix" | head -1)" >> $GITHUB_ENV
# - name: get extension name
# run: echo "VSIX_NAME=$(basename $(find . -maxdepth 1 -type f -iname "*.vsix" | head -1))" >> $GITHUB_ENV
- name: get extension version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
# - name: create upload artifacts
# uses: actions/upload-artifact@v2
# with:
# path: ${{ env.VSIX_PATH }}
# name: ${{ env.VSIX_NAME }}
# - name: create github release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: npm -g install @semantic-release/git semantic-release && semantic-release
- name: create github release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.PACKAGE_VERSION }}
release_name: 'my rel'
body: ${{env.RELEASE_NOTE}}
draft: false
prerelease: false
# - name: upload releases
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PUBLISH_TOKEN: ${{ secrets.MARKETPLACE_PUBLISH_KEY }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ${{ env.VSIX_PATH }}
# asset_name: ${{ env.VSIX_NAME }}
# asset_content_type: application/zip
# - name: publish to marketplace
# run: vsce publish -i ${{ env.VSIX_PATH }} -p ${{ secrets.MARKETPLACE_PUBLISH_KEY }}
# - name: publish to open-vsix
# run: ovsx publish ${{ env.VSIX_PATH }} -p ${{ secrets.OPEN_VSX_TOKEN }}
# good example of action workflow for publishing an extension
# https://github.com/politie/omt-odt-language/pull/30/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34
# vsce source for understanding switches
# https://github.com/microsoft/vscode-vsce/tree/main/src
# ovsx source
# https://github.com/eclipse/openvsx
# another ci/cd example
# https://dev.to/shaimendel/vs-code-extension-building-auto-ci-cd-with-github-actions-2dmf
# https://github.com/shaimendel/vscode-plugin-cicd-github-actions/blob/master/.github/workflows/ci.yaml