Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Sinyapkin committed Apr 23, 2024
1 parent 8431c00 commit aaadebc
Showing 1 changed file with 63 additions and 6 deletions.
69 changes: 63 additions & 6 deletions .github/workflows/build-nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,7 +29,7 @@ jobs:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-apple-darwin
- aarch64-unknown-linux-gnu

steps:
- name: Install Rust
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit aaadebc

Please sign in to comment.