-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (40 loc) · 1.27 KB
/
release.yml
File metadata and controls
49 lines (40 loc) · 1.27 KB
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
name: Release Extension
on:
push:
branches: [main] # Automatic releases on main branch
workflow_dispatch: # Manual triggering
permissions:
contents: write
issues: write
pull-requests: write
actions: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for Nyx
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run tests
run: ./gradlew test
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Build extension with updated version
run: ./gradlew bwextension
- name: Nyx publish release with assets
run: ./gradlew nyxPublish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}