-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (74 loc) · 2.48 KB
/
deploy.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
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
name: Deploy
on:
workflow_dispatch:
inputs:
version_type:
description: "The type of the release version."
required: true
type: choice
options:
- major
- minor
- patch
- alpha
increment:
description: "Whether to increment the version before release."
type: boolean
default: true
push:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Exit
run: exit 1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Update Version
id: update-version
run: |
output=$(python scripts/deploy/update_version.py ${{ inputs.version_type }} ${{ inputs.increment }})
echo "VERSION=$output" >> $GITHUB_OUTPUT
# - name: Generate Changelogs
# run: |
# pip install .[dev.changelog]
# towncrier build --yes
# python scripts/deploy/populate_changelog.py CHANGES.md docs/source/changelogs/v3-changelog.md
# rm fragments/*.md
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Bump version"
file_pattern: "build.gradle.kts"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish Plugin
env:
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
run: ./gradlew publishPlugin
- name: Create Tag
run: |
git tag ${{ steps.update-version.outputs.VERSION }}
git push origin ${{ steps.update-version.outputs.VERSION }}
- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: "${{ secrets.GITHUB_TOKEN }}"
name: "v${{ steps.update-version.outputs.VERSION }}"
tag_name: "refs/tags/${{ steps.update-version.outputs.VERSION }}"
# body_path: CHANGES.md
prerelease: ${{ inputs.version_type == 'alpha' }}
files: build/distributions/hikari-lightbulb-support-${{ steps.update-version.outputs.VERSION }}.zip