Skip to content

Commit

Permalink
ci: fix artifacts not uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Bricklou committed Aug 16, 2023
1 parent d1967aa commit 941190b
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
{{__unknown__}}
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -65,13 +64,14 @@ jobs:
arguments: build

- name: Rename artifact to use tag as version
if: startsWith(github.ref, 'refs/heads/v')
if: startsWith(github.ref, 'refs/tags/v')
run: |
mv build/libs/*.jar build/libs/archivist-${{github.ref_name}}.jar
- name: Upload artifact
uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/heads/v')
if: startsWith(github.ref, 'refs/tags/v')
id: artifact
with:
name: artifact
path: build/libs/*.jar
Expand All @@ -90,15 +90,28 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
draft: true
body: |
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
- name: Upload artifact
uses: actions/upload-artifact@v2
- uses: actions/download-artifact@master
with:
name: artifact
path: build/libs/*.jar

- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/libs/*.jar
asset_name: archivist-${{github.ref_name}}.jar
asset_content_type: application/java-archive

- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}

0 comments on commit 941190b

Please sign in to comment.