-
Notifications
You must be signed in to change notification settings - Fork 10
92 lines (87 loc) · 2.73 KB
/
release.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
name: Release
on:
push:
tags:
- "*.*.*"
# Running from workflow dispatch (AKA manual) will not publish anything.
# This is intended for testing changes to this flow.
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
id: version
- name: get custom delve
run: |
mkdir -p bin/macos/arm64
mkdir -p bin/macos/x86-64
wget https://github.com/metalbear-co/delve/releases/download/1.20.1/delve_darwin_arm64 -O bin/macos/arm64/dlv
wget https://github.com/metalbear-co/delve/releases/download/1.20.1/delve_darwin_amd64 -O bin/macos/x86-64/dlv
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Build Plugin
run: |
chmod +x ./gradlew
./gradlew buildPlugin
- name: Publish Plugin
if: github.event_name != 'workflow_dispatch'
env:
PUBLISH_TOKEN: ${{ secrets.INTELLIJ_PUBLISH_TOKEN }}
CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.INTELLIJ_PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_PRIVATE_KEY_PASSWORD }}
run: |
chmod +x ./gradlew
./gradlew publishPlugin
- uses: actions/upload-artifact@v3
with:
name: intellij-ext
path: build/distributions/*.zip
if-no-files-found: error
release_gh:
needs: [release]
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
permissions:
packages: write
contents: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: /tmp/artifacts
- name: Prepare binaries for upload
run: |
mkdir /tmp/release
mv /tmp/artifacts/intellij-ext/* /tmp/release/
# Consider to add changelog generation..
- name: Release
uses: softprops/action-gh-release@v1
with:
files: /tmp/release/**
update_latest:
needs: release_gh
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
steps:
- name: Check out code
uses: actions/checkout@v3
with:
# Get complete history
fetch-depth: 0
- name: Update major version and latest tags
uses: metalbear-co/release-tracker-action@main
env:
# GitHub token to enable pushing tags
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Move "latest" tag
update-latest: true
# Don't update the vX.Y tags
update-minor: false