Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build MacOS M1 | |
on: | |
push: | |
branches: | |
- main | |
- master | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build-debug: | |
runs-on: [m1] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install CMake | |
run: arch -arm64 brew install cmake | |
- name: Configure CMake | |
run: arch -arm64 cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug | |
- name: Build | |
run: arch -arm64 cmake --build ${{github.workspace}}/build --config Debug | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Debug build | |
path: | | |
${{github.workspace}}/build/chia_plot | |
${{github.workspace}}/build/chia_plot_k34 | |
build-release: | |
runs-on: [m1] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install CMake | |
run: arch -arm64 brew install cmake | |
- name: Configure CMake | |
run: arch -arm64 cmake -B ${{github.workspace}}/build | |
- name: Build | |
run: arch -arm64 cmake --build ${{github.workspace}}/build --config Release | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Release build | |
path: | | |
${{github.workspace}}/build/chia_plot | |
${{github.workspace}}/build/chia_plot_k34 | |
- name: Get tag name | |
if: startsWith(github.ref, 'refs/tags/') | |
id: tag-name | |
run: | | |
echo "TAG_NAME=$(echo ${{ github.ref }} | cut -d'/' -f 3)" >> "$GITHUB_OUTPUT" | |
- name: Get Release ID | |
if: startsWith(github.ref, 'refs/tags/') | |
id: release-id | |
run: | | |
echo "RELEASE_ID=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.tag-name.outputs.TAG_NAME }} | jq '.id')" >> "$GITHUB_OUTPUT" | |
- name: Upload to Release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
curl \ | |
-X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Content-Type: $(file -b --mime-type ${{github.workspace}}/build/chia_plot)" \ | |
--data-binary @${{github.workspace}}/build/chia_plot \ | |
https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.release-id.outputs.RELEASE_ID }}/assets?name=chia_plot-${{ steps.tag-name.outputs.TAG_NAME }}-macos-m1 | |
curl \ | |
-X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Content-Type: $(file -b --mime-type ${{github.workspace}}/build/chia_plot_k34)" \ | |
--data-binary @${{github.workspace}}/build/chia_plot_k34 \ | |
https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.release-id.outputs.RELEASE_ID }}/assets?name=chia_plot_k34-${{ steps.tag-name.outputs.TAG_NAME }}-macos-m1 |