-
Notifications
You must be signed in to change notification settings - Fork 37
87 lines (83 loc) · 2.96 KB
/
main.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
87
name: CI
on:
repository_dispatch:
push:
paths-ignore:
- README.md
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M')"
- name: Build with Ant
run: ant -noinput -buildfile build.xml -Dtimestamp=${{steps.date.outputs.date}}
- name: Create Release
id: create_release
if: github.event_name == 'push'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{steps.date.outputs.date}}
release_name: ${{steps.date.outputs.date}}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
if: github.event_name == 'push'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/CommunityModules-${{steps.date.outputs.date}}.jar
asset_name: CommunityModules-${{steps.date.outputs.date}}.jar
asset_content_type: application/zip
- name: Upload dateless Release Asset
id: upload-dateless-release-asset
if: github.event_name == 'push'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/CommunityModules.jar
asset_name: CommunityModules.jar
asset_content_type: application/zip
- name: Upload Release Asset
id: upload-release-asset-deps
if: github.event_name == 'push'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/CommunityModules-deps-${{steps.date.outputs.date}}.jar
asset_name: CommunityModules-deps-${{steps.date.outputs.date}}.jar
asset_content_type: application/zip
- name: Upload dateless Release Asset
id: upload-dateless-release-asset-deps
if: github.event_name == 'push'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/CommunityModules-deps.jar
asset_name: CommunityModules-deps.jar
asset_content_type: application/zip
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
repository: tlaplus/tlaplus
event-type: tlaplus-dispatch
client-payload: '{"source": "CommunityModules"}'