-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (36 loc) · 1.1 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
name: Release
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
- name: Display dotnet version
run: dotnet --version
- name: Compile
run: make
- name: Zip rules directory
run: |
mkdir MxLintExtension
cp bin/Debug/net8.0/* MxLintExtension
zip -r extension.zip MxLintExtension
- name: Get current tag version
run: |
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
echo "upload_url=${{ github.event.release.upload_url }}" >> $GITHUB_OUTPUT
id: get_release
- name: Upload Release Asset (ZIP)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./extension.zip
asset_name: MxLintExtension-${{ steps.get_release.outputs.tag_name}}.zip
asset_content_type: application/zip