Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 34ecc0c

Browse files
Create onTagCreateRelease.yml
1 parent ca30e9b commit 34ecc0c

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
9+
jobs:
10+
build:
11+
name: Create Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
19+
- name: Create release name using the tag name
20+
run: |
21+
githubRef=${{ github.ref }}
22+
githubRef="${githubRef/'refs/tags'/''}"
23+
githubRef="${githubRef/'/'/''}"
24+
githubRef="${githubRef/'v'/''}"
25+
echo "releaseLabel=$githubRef" >> $GITHUB_ENV
26+
27+
28+
- name: Print release label
29+
run: echo $releaseLabel
30+
31+
32+
- name: Create release directory
33+
run: mkdir -p release/bin
34+
35+
36+
### Generate jar file
37+
38+
- name: Set up JDK 11
39+
uses: actions/setup-java@v2
40+
with:
41+
java-version: '11'
42+
distribution: 'adopt'
43+
44+
45+
- name: Install Maven
46+
run: sudo apt install maven
47+
48+
49+
- name: Check Maven Version
50+
run: mvn -version
51+
52+
53+
- name: Build jar using Maven
54+
run: mvn --batch-mode install verify -U -X
55+
56+
57+
### Create zip file
58+
59+
- name: Copy jar file from the dist to the release directory
60+
run: cp dist/javaxt-src*.jar release/bin/javaxt-src.jar
61+
62+
63+
- name: Copy release assets to the release directory
64+
run: cp -r src ui LICENSE.TXT release
65+
66+
67+
- name: Create zip file
68+
run: cd release; zip -r ../javaxt-src_v${{ env.releaseLabel }}.zip *
69+
70+
71+
### Upload zip file to javaxt.com
72+
73+
- name: Upload release to server
74+
run: >-
75+
curl -X POST -L
76+
-H "Authorization: ${{ secrets.UPLOAD_AUTH }}"
77+
-F "file=@javaxt-src_v${{ env.releaseLabel }}.zip;type=application/zip"
78+
"${{ secrets.UPLOAD_URL }}"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /