diff --git a/.github/workflows/build-nightly-release.yaml b/.github/workflows/build-nightly-release.yaml index c35ded1..6cc8820 100644 --- a/.github/workflows/build-nightly-release.yaml +++ b/.github/workflows/build-nightly-release.yaml @@ -10,7 +10,17 @@ env: NIGHTLY_RELEASE_DIR: build/release jobs: - build-nightly-release: + prepare-release-directory: + runs-on: ubuntu-latest + steps: + - name: Prepare release directory + run: | + mkdir -p ${{ env.NIGHTLY_RELEASE_DIR }} + echo "ref: $GITHUB_REF" > ${{ env.NIGHTLY_RELEASE_DIR }}/README.md + echo "commit: $GITHUB_SHA" >> ${{ env.NIGHTLY_RELEASE_DIR }}/README.md + echo "date: $(date +"%Y-%m-%dT%H:%M:%SZ")" >> ${{ env.NIGHTLY_RELEASE_DIR }}/README.md + + build-cross: runs-on: ubuntu-latest env: RUST_BACKTRACE: full @@ -19,7 +29,7 @@ jobs: matrix: target: - x86_64-unknown-linux-gnu - - aarch64-apple-darwin + - aarch64-unknown-linux-gnu steps: - name: Install Rust @@ -47,12 +57,59 @@ jobs: LURK_VERSION=$(grep -E '^version' Cargo.toml | awk '{print $3}' | sed 's/"//g') LURK_RELEASE_NAME=lurk-v${LURK_VERSION}-nightly-${{ matrix.target }} - mkdir -p ${{ env.NIGHTLY_RELEASE_DIR }} mv target/${{ matrix.target }}/release/lurk ${{env.NIGHTLY_RELEASE_DIR}}/${LURK_RELEASE_NAME} - echo "ref: $GITHUB_REF" > ${{ env.NIGHTLY_RELEASE_DIR }}/README.md - echo "commit: $GITHUB_SHA" >> ${{ env.NIGHTLY_RELEASE_DIR }}/README.md - echo "date: $(date +"%Y-%m-%dT%H:%M:%SZ")" >> ${{ env.NIGHTLY_RELEASE_DIR }}/README.md + - name: Update nightly release + uses: pyTooling/Actions/releaser@main + with: + tag: nightly + rm: false + token: ${{ secrets.GITHUB_TOKEN }} + files: ${{ env.NIGHTLY_RELEASE_DIR }}/* + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target }} + path: ${{ env.NIGHTLY_RELEASE_DIR }}/* + + build-unix: + runs-on: macos-latest + env: + RUST_BACKTRACE: full + strategy: + fail-fast: false + matrix: + target: + - x86_64-apple-darwin + - aarch64-apple-darwin + steps: + - name: Install Rust + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} + + - name: Install cross + run: | + cargo install cross + + - name: Checkout + uses: actions/checkout@v4 + + - name: Build ${{ matrix.target }} + timeout-minutes: 120 + run: | + cargo build --target ${{ matrix.target }} --release + + - name: Prepare release + run: | + LURK_VERSION=$(grep -E '^version' Cargo.toml | awk '{print $3}' | sed 's/"//g') + LURK_RELEASE_NAME=lurk-v${LURK_VERSION}-nightly-${{ matrix.target }} + + mv target/${{ matrix.target }}/release/lurk ${{env.NIGHTLY_RELEASE_DIR}}/${LURK_RELEASE_NAME} - name: Update nightly release uses: pyTooling/Actions/releaser@main