|
1 | | - |
2 | 1 | name: Liberar nova versão |
3 | 2 |
|
4 | 3 | on: |
|
10 | 9 | jobs: |
11 | 10 |
|
12 | 11 | package: |
13 | | - runs-on: ubuntu-20.04 |
| 12 | + runs-on: ubuntu-24.04 |
14 | 13 | name: Empacotar executavel |
15 | 14 | steps: |
16 | 15 | - uses: actions/checkout@v2 |
17 | | - - uses: actions/setup-java@v2 |
| 16 | + |
| 17 | + - uses: actions/setup-java@v3 |
18 | 18 | with: |
19 | 19 | java-version: '8' |
20 | | - distribution: 'adopt' |
21 | | - cache: maven |
22 | | - - name: Cache local Maven repository |
| 20 | + distribution: 'temurin' |
| 21 | + |
| 22 | + - name: Cache Maven repository |
23 | 23 | uses: actions/cache@v3 |
24 | 24 | with: |
25 | 25 | path: ~/.m2/repository |
26 | | - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 26 | + key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} |
27 | 27 | restore-keys: | |
28 | | - ${{ runner.os }}-maven- |
| 28 | + maven-${{ runner.os }}- |
| 29 | +
|
29 | 30 | - name: Ajustando Timezone |
30 | 31 | |
31 | 32 | with: |
32 | 33 | timezoneLinux: "America/Sao_Paulo" |
33 | 34 | timezoneMacos: "America/Sao_Paulo" |
34 | 35 | timezoneWindows: "America/Sao_Paulo" |
| 36 | + |
35 | 37 | - name: Criando executavel |
36 | 38 | run: | |
37 | | - mvn versions:set -DnewVersion=${{github.ref_name}} |
| 39 | + mvn versions:set -DnewVersion=${{ github.ref_name }} |
38 | 40 | mvn -B package -Passembly --file pom.xml |
39 | 41 |
|
40 | 42 | - name: Criando pasta para Zip |
41 | | - run: mkdir java-nfe && cp target/java-nfe-${{github.ref_name}}.jar java-nfe && cp schemas.zip java-nfe |
| 43 | + run: | |
| 44 | + mkdir java-nfe |
| 45 | + cp target/java-nfe-${{ github.ref_name }}.jar java-nfe |
| 46 | + cp schemas.zip java-nfe |
| 47 | +
|
42 | 48 | - uses: montudor/action-zip@v1 |
43 | 49 | with: |
44 | | - args: zip -qq -r java-nfe-${{github.ref_name}}.zip java-nfe |
| 50 | + args: zip -qq -r java-nfe-${{ github.ref_name }}.zip java-nfe |
45 | 51 |
|
46 | 52 | - name: Criando release |
47 | 53 | uses: actions/create-release@v1 |
48 | 54 | id: create_release |
49 | 55 | with: |
50 | 56 | draft: false |
51 | 57 | prerelease: false |
52 | | - release_name: ${{ steps.version.outputs.version }} |
| 58 | + release_name: ${{ github.ref_name }} |
53 | 59 | tag_name: ${{ github.ref }} |
54 | 60 | body_path: CHANGELOG.md |
55 | 61 | env: |
56 | | - GITHUB_TOKEN: ${{ github.token }} |
| 62 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 63 | + |
57 | 64 | - name: Subir executavel (zip) para release |
58 | 65 | uses: actions/upload-release-asset@v1 |
59 | 66 | env: |
60 | | - GITHUB_TOKEN: ${{ github.token }} |
| 67 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
61 | 68 | with: |
62 | 69 | upload_url: ${{ steps.create_release.outputs.upload_url }} |
63 | | - asset_path: ./java-nfe-${{github.ref_name}}.zip |
64 | | - asset_name: java-nfe-${{github.ref_name}}.zip |
| 70 | + asset_path: ./java-nfe-${{ github.ref_name }}.zip |
| 71 | + asset_name: java-nfe-${{ github.ref_name }}.zip |
65 | 72 | asset_content_type: application/zip |
0 commit comments