-
Notifications
You must be signed in to change notification settings - Fork 24
70 lines (68 loc) · 2.33 KB
/
Copy pathrelease.yml
File metadata and controls
70 lines (68 loc) · 2.33 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release
# タグの push をトリガーに、リリースビルドと Draft リリースの作成を行う。
# Maven Central / Gradle Plugin Portal への公開は CircleCI (.circleci/config.yml) で
# 行っており、移行が完了するまでこのワークフローでは実施しない。
on:
push:
tags:
- '**'
jobs:
release-build:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dfile.encoding=UTF-8'
# CircleCI の publish ジョブと同様にタグ名をバージョンとしてビルドする
ORG_GRADLE_PROJECT_version: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v5.7.0
with:
distribution: 'temurin'
# 25はfixtureを最新LTSのクラスファイルへコンパイルするために使う。21をJAVA_HOMEにする
java-version: |
25
21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6.2.0
- name: Set up Node.js
uses: actions/setup-node@v7.0.0
with:
node-version: '24'
cache: 'npm'
- name: Install JS dependencies
run: npm ci
- name: Run JS tests
run: npm run test
- name: Run stylelint
run: npm run lint:css
- name: Run Build
run: ./gradlew build qualityCheck
- name: Run JS contract tests
# 入力は Gradle の contractTest が生成するサイト
run: npm run test:contract:js
- name: Upload test failure report
uses: actions/upload-artifact@v7
if: failure()
with:
name: test-failure-reports-release
path: build/reports/tests/
retention-days: 3
- name: Dogfooding
run: java -jar jig-cli/build/libs/jig-cli.jar --outputDirectory=example
- name: Upload dogfooding result
uses: actions/upload-artifact@v7
with:
name: example
path: example
- name: Create draft release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" \
--draft \
--verify-tag \
--title "${{ github.ref_name }}" \
--generate-notes \
jig-cli/build/libs/jig-cli.jar