-
-
Notifications
You must be signed in to change notification settings - Fork 15
90 lines (78 loc) · 2.63 KB
/
publish.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
name: Publish
on:
workflow_dispatch:
inputs:
nightly:
type: boolean
default: true
required: false
description: 'Publish a nightly build'
jobs:
build:
name: Build
uses: ./.github/workflows/_build.yaml
with:
nightly: ${{ inputs.nightly }}
artifact: true
publish-jetbrains:
name: Publish to JetBrains Marketplace
needs: [ build ]
runs-on: ubuntu-latest
environment: intellij-plugin
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download the artifact
uses: actions/download-artifact@v4
with:
name: Biome-${{ needs.build.outputs.version }}.zip
- name: Restore gradle.properties
uses: actions/cache/restore@v3
with:
path: gradle.properties
key: gradle.properties.${{ github.sha }}
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }}
CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }}
run: ./gradlew publishPlugin -PdistributionFile="./build/distributions/Biome-${{ needs.build.outputs.version }}.zip"
publish-github-release:
name: Publish to GitHub Releases
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download the artifact
uses: actions/download-artifact@v4
with:
name: Biome-${{ needs.build.outputs.version }}.zip
- name: Generate release notes
id: release-notes
uses: orhun/git-cliff-action@v2
with:
config: cliff.toml
args: -vv --latest --strip header e71479100d4ed81b3e9c26881c38a0ddb7da31eb..
env:
OUTPUT: CHANGES.md
- name: Strip tag from release notes
run: tail -n +3 < CHANGES.md > RELEASE_NOTES.md
- name: Rename artifact
run: mv "Biome-${{ needs.build.outputs.version }}.zip" biome.zip
- name: Publish extension to GitHub Releases
uses: softprops/action-gh-release@v1
with:
name: "v${{ needs.build.outputs.version }}"
body_path: RELEASE_NOTES.md
prerelease: ${{ needs.build.outputs.nightly == 'true' }}
draft: true
files: biome.zip
tag_name: ${{ needs.build.outputs.nightly == 'true' && github.ref || format('v{0}', needs.build.outputs.version) }}