archiving artifacts
This commit is contained in:
parent
3f7d187b6b
commit
564b861bac
1 changed files with 32 additions and 56 deletions
88
.github/workflows/build.yml
vendored
88
.github/workflows/build.yml
vendored
|
@ -36,37 +36,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
make
|
make
|
||||||
|
|
||||||
- name: Set commit hash variables
|
- name: Archive production artifacts
|
||||||
id: commit
|
uses: actions/upload-artifact@v3
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
|
||||||
uses: pr-mpt/actions-commit-hash@v2
|
|
||||||
|
|
||||||
- name: Pack artifacts
|
|
||||||
id: pack_artifacts
|
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
|
||||||
run: |
|
|
||||||
zip alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-linux-x64.zip chat
|
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
id: create_release
|
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
|
||||||
uses: zendesk/action-create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}
|
name: ubuntu
|
||||||
|
path: |
|
||||||
|
chat
|
||||||
|
|
||||||
- name: Upload release
|
|
||||||
id: upload_release
|
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: .\alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-linux-x64.zip
|
|
||||||
asset_name: alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-linux-x64.zip
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
||||||
macOS-latest:
|
macOS-latest:
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
|
@ -86,37 +62,37 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
make
|
make
|
||||||
|
|
||||||
- name: Set commit hash variables
|
- name: Archive production artifacts
|
||||||
id: commit
|
uses: actions/upload-artifact@v3
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
with:
|
||||||
uses: pr-mpt/actions-commit-hash@v2
|
name: macos
|
||||||
|
path: |
|
||||||
|
chat
|
||||||
|
|
||||||
- name: Pack artifacts
|
macOS-arm64:
|
||||||
id: pack_artifacts
|
runs-on: macOS-arm64
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
|
||||||
|
steps:
|
||||||
|
- name: Clone
|
||||||
|
id: checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Dependencies
|
||||||
|
id: depends
|
||||||
run: |
|
run: |
|
||||||
zip alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-mac-x64.zip chat
|
brew update
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
id: create_release
|
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
|
||||||
uses: zendesk/action-create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}
|
|
||||||
|
|
||||||
- name: Upload release
|
- name: Build
|
||||||
id: upload_release
|
id: make_build
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
run: |
|
||||||
uses: actions/upload-release-asset@v1
|
make
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- name: Archive production artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
name: macos
|
||||||
asset_path: .\alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-mac-x64.zip
|
path: |
|
||||||
asset_name: alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-mac-x64.zip
|
chat
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
||||||
windows-latest:
|
windows-latest:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue