|
1 | | -on: |
2 | | - push: |
3 | | - tags: |
4 | | - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
5 | | -name: Build |
6 | | -jobs: |
7 | | - build: |
8 | | - runs-on: ubuntu-latest |
9 | | - steps: |
10 | | - - uses: actions/checkout@v1 |
11 | | - - name: Set up JDK 1.8 |
12 | | - uses: actions/setup-java@v1 |
13 | | - with: |
14 | | - java-version: 1.8 |
15 | | - - name: Build with Maven |
16 | | - run: mvn -B package --file pom.xml |
17 | | - |
18 | | - - name: Generate build number |
19 | | - uses: einaregilsson/build-number@v1 |
20 | | - id: buildnumber |
21 | | - with: |
22 | | - token: ${{ secrets.GITHUB_TOKEN }} |
23 | | - |
24 | | - - name: Run Helper |
25 | | - id: helper |
26 | | - run: "chmod +x ./.github/release-helper && bash ./.github/release-helper" |
27 | | - env: |
28 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
29 | | - |
30 | | - - name: Discord Success Message |
31 | | - if: success() |
32 | | - uses: appleboy/discord-action@master |
33 | | - with: |
34 | | - webhook_id: ${{ secrets.WEBHOOK_ID }} |
35 | | - webhook_token: ${{ secrets.WEBHOOK_TOKEN }} |
36 | | - color: "#32cd32" |
37 | | - message: "**[RPBookGUI - Build ${{ steps.buildnumber.outputs.build_number }}]**\n\nBuild Success!\nChanges:\n${{ steps.helper.outputs.COMMIT_MESSAGE }}" |
38 | | - |
39 | | - - name: Discord Failure Message |
40 | | - if: failure() |
41 | | - uses: appleboy/discord-action@master |
42 | | - with: |
43 | | - webhook_id: ${{ secrets.WEBHOOK_ID }} |
44 | | - webhook_token: ${{ secrets.WEBHOOK_TOKEN }} |
45 | | - color: "#f70d1a" |
46 | | - message: "**[RPBookGUI - Build ${{ steps.buildnumber.outputs.build_number }}]**\n\nBuild Failed!\nChanges:\n${{ steps.helper.outputs.COMMIT_MESSAGE }}" |
47 | | - |
48 | | - - name: Make Artifact Directory |
49 | | - run: "mkdir ./artifacts" |
50 | | - |
51 | | - - name: Find and Move JARS |
52 | | - run: "mv `find target -name *.jar -print` ./artifacts" |
53 | | - |
54 | | - - name: Upload Artifact |
55 | | - if: success() |
56 | | - uses: actions/upload-artifact@master |
57 | | - with: |
58 | | - name: Artifacts |
59 | | - path: "./artifacts" |
60 | | - |
61 | | - - name: Create Release |
62 | | - id: create_release |
63 | | - if: success() |
64 | | - uses: actions/create-release@master |
65 | | - env: |
66 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
67 | | - with: |
68 | | - tag_name: build-number-${{ steps.buildnumber.outputs.build_number }} |
69 | | - release_name: Build ${{ steps.buildnumber.outputs.build_number }} |
70 | | - draft: false |
71 | | - prerelease: false |
72 | | - |
73 | | - - name: Upload asset to release |
74 | | - uses: Puyodead1/upload-release-asset@feature-glob |
75 | | - id: upload-release-asset |
76 | | - if: success() |
77 | | - env: |
78 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
79 | | - with: |
80 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
81 | | - |
82 | | - - name: Discord Success Message |
83 | | - if: success() |
84 | | - uses: appleboy/discord-action@master |
85 | | - with: |
86 | | - webhook_id: ${{ secrets.WEBHOOK_ID }} |
87 | | - webhook_token: ${{ secrets.WEBHOOK_TOKEN }} |
88 | | - color: "#32cd32" |
89 | | - message: "**[RPBookGUI - Build ${{ steps.buildnumber.outputs.build_number }}]**\nNew Release!\n\n**Download:** ${{ steps.upload-release-asset.outputs.browser_download_url }}\nChanges:\n${{ steps.helper.outputs.COMMIT_MESSAGE }}" |
| 1 | +#on: |
| 2 | +# push: |
| 3 | +# tags: |
| 4 | +# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 |
| 5 | +# |
| 6 | +#name: Build |
| 7 | +#jobs: |
| 8 | +# build: |
| 9 | +# runs-on: ubuntu-latest |
| 10 | +# steps: |
| 11 | +# - uses: actions/checkout@v1 |
| 12 | +# - name: Set up JDK 1.8 |
| 13 | +# uses: actions/setup-java@v1 |
| 14 | +# with: |
| 15 | +# java-version: 1.8 |
| 16 | +# - name: Build with Maven |
| 17 | +# run: mvn -B package --file pom.xml |
| 18 | +# |
| 19 | +# - name: Generate build number |
| 20 | +# uses: einaregilsson/build-number@v1 |
| 21 | +# id: buildnumber |
| 22 | +# with: |
| 23 | +# token: ${{ secrets.GITHUB_TOKEN }} |
| 24 | +# |
| 25 | +# - name: Run Helper |
| 26 | +# id: helper |
| 27 | +# run: "chmod +x ./.github/release-helper && bash ./.github/release-helper" |
| 28 | +# env: |
| 29 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 30 | +# |
| 31 | +# - name: Discord Success Message |
| 32 | +# if: success() |
| 33 | +# uses: appleboy/discord-action@master |
| 34 | +# with: |
| 35 | +# webhook_id: ${{ secrets.WEBHOOK_ID }} |
| 36 | +# webhook_token: ${{ secrets.WEBHOOK_TOKEN }} |
| 37 | +# color: "#32cd32" |
| 38 | +# message: "**[RPBookGUI - Build ${{ steps.buildnumber.outputs.build_number }}]**\n\nBuild Success!\nChanges:\n${{ steps.helper.outputs.COMMIT_MESSAGE }}" |
| 39 | +# |
| 40 | +# - name: Discord Failure Message |
| 41 | +# if: failure() |
| 42 | +# uses: appleboy/discord-action@master |
| 43 | +# with: |
| 44 | +# webhook_id: ${{ secrets.WEBHOOK_ID }} |
| 45 | +# webhook_token: ${{ secrets.WEBHOOK_TOKEN }} |
| 46 | +# color: "#f70d1a" |
| 47 | +# message: "**[RPBookGUI - Build ${{ steps.buildnumber.outputs.build_number }}]**\n\nBuild Failed!\nChanges:\n${{ steps.helper.outputs.COMMIT_MESSAGE }}" |
| 48 | +# |
| 49 | +# - name: Make Artifact Directory |
| 50 | +# run: "mkdir ./artifacts" |
| 51 | +# |
| 52 | +# - name: Find and Move JARS |
| 53 | +# run: "mv `find target -name *.jar -print` ./artifacts" |
| 54 | +# |
| 55 | +# - name: Upload Artifact |
| 56 | +# if: success() |
| 57 | +# uses: actions/upload-artifact@master |
| 58 | +# with: |
| 59 | +# name: Artifacts |
| 60 | +# path: "./artifacts" |
| 61 | +# |
| 62 | +# - name: Create Release |
| 63 | +# id: create_release |
| 64 | +# if: success() |
| 65 | +# uses: actions/create-release@master |
| 66 | +# env: |
| 67 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 68 | +# with: |
| 69 | +# tag_name: build-number-${{ steps.buildnumber.outputs.build_number }} |
| 70 | +# release_name: Build ${{ steps.buildnumber.outputs.build_number }} |
| 71 | +# draft: false |
| 72 | +# prerelease: false |
| 73 | +# |
| 74 | +# - name: Upload asset to release |
| 75 | +# uses: Puyodead1/upload-release-asset@feature-glob |
| 76 | +# id: upload-release-asset |
| 77 | +# if: success() |
| 78 | +# env: |
| 79 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 80 | +# with: |
| 81 | +# upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 82 | +# |
| 83 | +# - name: Discord Success Message |
| 84 | +# if: success() |
| 85 | +# uses: appleboy/discord-action@master |
| 86 | +# with: |
| 87 | +# webhook_id: ${{ secrets.WEBHOOK_ID }} |
| 88 | +# webhook_token: ${{ secrets.WEBHOOK_TOKEN }} |
| 89 | +# color: "#32cd32" |
| 90 | +# message: "**[RPBookGUI - Build ${{ steps.buildnumber.outputs.build_number }}]**\nNew Release!\n\n**Download:** ${{ steps.upload-release-asset.outputs.browser_download_url }}\nChanges:\n${{ steps.helper.outputs.COMMIT_MESSAGE }}" |
0 commit comments