-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.76 KB
/
deploy_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
name: Deploy release
on:
release:
types: [prereleased, released]
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Get the version
id: get_version
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Set pom version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
- name: Build with Maven
run: mvn clean install
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: teamcity-inspection-notification-plugin-build/target/inspection-violation-notification.zip
asset_name: inspection-violation-notification.zip
asset_content_type: application/zip
- name: Choose Release track
id: get_track
run: echo TRACK=$(if [[ "${{ steps.get_release.outputs.prerelease }}" == "false" ]] ; then echo stable ; else echo nightly ; fi) >> $GITHUB_OUTPUT
- name: Upload to Jetbrains Marketplace
run: 'curl -i --header "Authorization: Bearer ${{ secrets.TC_PUBLISH_TOKEN }}" -F pluginId=12382 -F file=@teamcity-inspection-notification-plugin-build/target/inspection-violation-notification.zip -F channel=${{ steps.get_track.outputs.TRACK }} https://plugins.jetbrains.com/plugin/uploadPlugin'