|
1 | | -name: CI |
| 1 | +name: Build |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - pull_request_target: |
| 5 | + branches-ignore: |
| 6 | + - dependabot/** |
6 | 7 |
|
7 | 8 | jobs: |
8 | | - build: |
9 | | - runs-on: ubuntu-latest |
10 | | - steps: |
11 | | - - name: Checkout Code |
12 | | - uses: actions/checkout@v2 |
13 | | - |
14 | | - - name: Set Up Java |
15 | | - uses: actions/setup-java@v2 |
16 | | - with: |
17 | | - distribution: 'adopt' |
18 | | - java-version: '17' |
19 | | - |
20 | | - # Use cache to speed up build |
21 | | - - name: Cache Maven Repo |
22 | | - uses: actions/cache@v2 |
23 | | - id: cache |
24 | | - with: |
25 | | - path: ~/.m2/repository |
26 | | - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
27 | | - |
28 | | - - name: Build With Maven |
29 | | - run: mvn -e clean package -am -P all |
30 | | - |
31 | | - # Upload artifacts |
32 | | - - name: Upload Distributable Jar |
33 | | - id: upload-final |
34 | | - uses: actions/upload-artifact@v2 |
35 | | - with: |
36 | | - name: dist |
37 | | - path: ./target/AnvilUnlocker.jar |
| 9 | + run-ci: |
| 10 | + uses: Jikoo/PlanarActions/.github/workflows/ci_maven.yml@master |
38 | 11 |
|
39 | 12 | release: |
40 | 13 | name: Create Github Release |
41 | | - needs: [ build ] |
| 14 | + needs: [ run-ci ] |
42 | 15 | if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') |
43 | 16 | runs-on: ubuntu-latest |
44 | 17 | steps: |
45 | | - - name: Checkout Code |
46 | | - uses: actions/checkout@v2 |
47 | | - with: |
48 | | - fetch-depth: 0 |
49 | | - |
50 | 18 | - name: Download Artifacts |
51 | | - uses: actions/download-artifact@v2 |
| 19 | + uses: actions/download-artifact@v4 |
| 20 | + with: |
| 21 | + name: ${{ github.event.repository.name }}-ci |
| 22 | + path: ${{ github.event.repository.name }}-ci |
52 | 23 |
|
53 | 24 | - name: Parse Tag Name |
54 | 25 | id: get_version |
55 | 26 | run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} |
56 | 27 |
|
57 | 28 | - name: Create Release |
58 | 29 | id: create-release |
59 | | - uses: softprops/action-gh-release@v0.1.5 |
| 30 | + uses: softprops/action-gh-release@v2.1.0 |
60 | 31 | env: |
61 | 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
62 | 33 | with: |
63 | 34 | name: AnvilUnlocker ${{ steps.get_version.outputs.result }} |
64 | 35 | draft: true |
65 | 36 | prerelease: true |
66 | | - files: ./dist/AnvilUnlocker.jar |
| 37 | + files: ./${{ github.event.repository.name }}-ci/AnvilUnlocker.jar |
0 commit comments