-
-
Notifications
You must be signed in to change notification settings - Fork 233
61 lines (57 loc) · 1.79 KB
/
release.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
name: Liberar nova versão
on:
workflow_dispatch:
push:
tags:
- '4.*'
jobs:
package:
runs-on: ubuntu-20.04
name: Empacotar executavel
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Ajustando Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "America/Sao_Paulo"
timezoneMacos: "America/Sao_Paulo"
timezoneWindows: "America/Sao_Paulo"
- name: Criando executavel
run: mvn -B package -Passembly --file pom.xml
- name: Criando pasta para Zip
run: mkdir java-nfe && cp target/*.jar java-nfe && cp schemas.zip java-nfe
- uses: montudor/action-zip@v1
with:
args: zip -qq -r java-nfe.zip java-nfe
- name: Criando release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Subir executavel (zip) para release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./java-nfe.zip
asset_name: java-nfe.zip
asset_content_type: application/zip