Skip to content

Commit 856411b

Browse files
committed
Simple release
1 parent 1929dcc commit 856411b

File tree

1 file changed

+10
-31
lines changed

1 file changed

+10
-31
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,28 @@
44

55
name: Release
66
on:
7-
release:
8-
types: [ prereleased, released ]
7+
push:
8+
tags:
9+
- v*
910

1011
jobs:
11-
12-
# Prepare and publish the plugin to the Marketplace repository
1312
release:
14-
name: Publish Plugin
1513
runs-on: ubuntu-latest
16-
permissions:
17-
contents: write
18-
pull-requests: write
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1916
steps:
20-
2117
# Check out current repository
2218
- name: Fetch Sources
2319
uses: actions/checkout@v4
24-
with:
25-
ref: ${{ github.event.release.tag_name }}
26-
2720
# Setup Java 11 environment for the next steps
2821
- name: Setup Java
2922
uses: actions/setup-java@v4
3023
with:
3124
distribution: zulu
3225
java-version: 17
33-
34-
# Set environment variables
35-
- name: Export Properties
36-
id: properties
37-
shell: bash
26+
- name: Build Plugin
3827
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/*
28+
./gradlew buildPlugin
29+
PKG="$(basename ${{ github.repository }})-${{ github.ref_name }}.zip"
30+
mv build/distributions/*.zip $PKG
31+
gh release create ${{ github.ref_name }} "./build/distributions/$PKG" --generate-notes

0 commit comments

Comments
 (0)