Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zyypj authored Feb 4, 2025
1 parent e27e343 commit 18030aa
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ jobs:

- name: Extrair versão do POM
id: get_version
run: echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "$VERSION" > version.txt
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Salvar versão para o próximo job
uses: actions/upload-artifact@v4
with:
name: version
path: version.txt

- name: Publicar artefato do JAR
uses: actions/upload-artifact@v4
Expand All @@ -48,6 +57,15 @@ jobs:
- name: Checkout do repositório
uses: actions/checkout@v4

- name: Baixar a versão salva
uses: actions/download-artifact@v4
with:
name: version
path: .

- name: Definir variável de versão
run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV

- name: Baixar o JAR compilado
uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit 18030aa

Please sign in to comment.