Skip to content

Commit 1929dcc

Browse files
committed
Adding workflow
1 parent b2e0f7b commit 1929dcc

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# GitHub Actions Workflow created for handling the release process based on the draft release prepared with the Build workflow.
2+
# Running the publishPlugin task requires all following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN.
3+
# See https://plugins.jetbrains.com/docs/intellij/plugin-signing.html for more information.
4+
5+
name: Release
6+
on:
7+
release:
8+
types: [ prereleased, released ]
9+
10+
jobs:
11+
12+
# Prepare and publish the plugin to the Marketplace repository
13+
release:
14+
name: Publish Plugin
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
steps:
20+
21+
# Check out current repository
22+
- name: Fetch Sources
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.release.tag_name }}
26+
27+
# Setup Java 11 environment for the next steps
28+
- name: Setup Java
29+
uses: actions/setup-java@v4
30+
with:
31+
distribution: zulu
32+
java-version: 17
33+
34+
# Set environment variables
35+
- name: Export Properties
36+
id: properties
37+
shell: bash
38+
run: |
39+
CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d'
40+
${{ github.event.release.body }}
41+
EOM
42+
)"
43+
44+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
45+
echo "$CHANGELOG" >> $GITHUB_OUTPUT
46+
echo "EOF" >> $GITHUB_OUTPUT
47+
48+
# Upload artifact as a release asset
49+
- name: Upload Release Asset
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*

0 commit comments

Comments
 (0)