Skip to content

Commit e1be566

Browse files
committed
auto-build.yml
1 parent 8d87a65 commit e1be566

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/auto-build.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
- name: Build with Maven
2323
run: |
2424
mvn -Dfile.encoding=UTF-8 -DskipTests=true install
25-
cp ./dht-server/target/*-with-dependencies.jar ./dht-server-${{ steps.branch-name.outputs.current_branch }}.jar
26-
cp ./dht-peer/target/*-with-dependencies.jar ./dht-peer-${{ steps.branch-name.outputs.current_branch }}.jar
27-
cp ./dht-es/target/*-with-dependencies.jar ./dht-es-${{ steps.branch-name.outputs.current_branch }}.jar
25+
cp ./dht-server/target/*-with-dependencies.jar ./dht-server-${{ steps.branch-name.outputs.tag }}.jar
26+
cp ./dht-peer/target/*-with-dependencies.jar ./dht-peer-${{ steps.branch-name.outputs.tag }}.jar
27+
cp ./dht-es/target/*-with-dependencies.jar ./dht-es-${{ steps.branch-name.outputs.tag }}.jar
2828
zip -q -r release.zip *.jar
2929
- name: Create Release
3030
id: create_release
@@ -33,7 +33,7 @@ jobs:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
with:
3535
tag_name: ${{ github.ref }}
36-
release_name: Release ${{ steps.branch-name.outputs.current_branch }}
36+
release_name: Release ${{ steps.branch-name.outputs.tag }}
3737
draft: false
3838
prerelease: false
3939
- name: Upload Release Asset
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
4646
asset_path: ./release.zip
47-
asset_name: release-${{ steps.branch-name.outputs.current_branch }}.zip
47+
asset_name: release-${{ steps.branch-name.outputs.tag }}.zip
4848
asset_content_type: application/zip
4949
- name: Set up QEMU
5050
uses: docker/setup-qemu-action@v2
@@ -61,16 +61,16 @@ jobs:
6161
with:
6262
context: dht-server
6363
push: true
64-
tags: docker.io/zpqsunny/dht-server:latest,docker.io/zpqsunny/dht-server:${{ steps.branch-name.outputs.current_branch }}
64+
tags: docker.io/zpqsunny/dht-server:latest,docker.io/zpqsunny/dht-server:${{ steps.branch-name.outputs.tag }}
6565
- name: Build and push dht-peer
6666
uses: docker/build-push-action@v4
6767
with:
6868
context: dht-peer
6969
push: true
70-
tags: docker.io/zpqsunny/dht-peer:latest,docker.io/zpqsunny/dht-peer:${{ steps.branch-name.outputs.current_branch }}
70+
tags: docker.io/zpqsunny/dht-peer:latest,docker.io/zpqsunny/dht-peer:${{ steps.branch-name.outputs.tag }}
7171
- name: Build and push dht-es
7272
uses: docker/build-push-action@v4
7373
with:
7474
context: dht-es
7575
push: true
76-
tags: docker.io/zpqsunny/dht-es:latest,docker.io/zpqsunny/dht-es:${{ steps.branch-name.outputs.current_branch }}
76+
tags: docker.io/zpqsunny/dht-es:latest,docker.io/zpqsunny/dht-es:${{ steps.branch-name.outputs.tag }}

0 commit comments

Comments
 (0)