Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
afwbkbc committed Jul 8, 2024
1 parent 8c8fdd6 commit 6ed66a9
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/buildall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ jobs:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
release_id: ${{ steps.create_release.outputs.id }}
ver: ${{ steps.info.outputs.ver }}
sha: ${{ steps.info.outputs.sha }}
steps:
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
# - uses: dev-drprasad/[email protected]
# with:
# keep_latest: 4
# delete_tags: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: dev-drprasad/[email protected]
with:
keep_latest: 5
delete_tags: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: info
id: info
env:
Expand All @@ -44,12 +45,12 @@ jobs:
with:
tag_name: ${{ steps.info.outputs.ver }}-${{ steps.info.outputs.sha }}
release_name: ${{ steps.info.outputs.ver }}-${{ steps.info.outputs.sha }}
draft: false
draft: true
prerelease: false


build_linux64:
needs: [prepare]
build_linux:
needs: [prepare,finalize]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -66,7 +67,7 @@ jobs:
- name: make
working-directory: ./build
run: make
- name: data
- ƒname: data
working-directory: ./build
run: mv ../GLSMAC_data bin/
- name: pack
Expand All @@ -85,12 +86,12 @@ jobs:
with:
upload_url: ${{ needs.prepare.outputs.upload_url }}
asset_path: ./build/GLSMAC.tar.gz
asset_name: GLSMAC-${{ needs.prepare.ver }}-linux64-${{ needs.prepare.sha }}.tar.gz
asset_name: GLSMAC-${{ needs.prepare.outputs.ver }}-linux64-${{ needs.prepare.outputs.sha }}.tar.gz
asset_content_type: application/gzip


build_windows64:
needs: [prepare]
build_windows:
needs: [prepare,finalize]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -111,7 +112,6 @@ jobs:
run: mv ../GLSMAC_data bin/
- name: pack
working-directory: ./build/bin
# run: tar -C bin -zcvf GLSMAC.tar.gz GLSMAC.exe GLSMAC_data
run: Compress-Archive -Path GLSMAC.exe,GLSMAC_data -Destination ../GLSMAC.zip
- name: publish
uses: actions/upload-artifact@v3
Expand All @@ -126,5 +126,18 @@ jobs:
with:
upload_url: ${{ needs.prepare.outputs.upload_url }}
asset_path: ./build/GLSMAC.zip
asset_name: GLSMAC-${{ needs.prepare.outputs.ver }}-windows64-${{ needs.prepare.outputs.sha }}.zip
asset_name: GLSMAC-${{ needs.prepare.outputs.ver }}-win64-${{ needs.prepare.outputs.sha }}.zip
asset_content_type: application/gzip

finalize:
# needs: [prepare,build_linux,build_windows]
needs: [prepare]
runs-on: ubuntu-latest
steps:
- name: update-release
uses: actions/edit-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ needs.prepare.outputs.release_id }}
draft: false

0 comments on commit 6ed66a9

Please sign in to comment.