diff --git a/.github/workflows/build-nightly-release.yaml b/.github/workflows/build-nightly-release.yaml index 8670916..87ea7c2 100644 --- a/.github/workflows/build-nightly-release.yaml +++ b/.github/workflows/build-nightly-release.yaml @@ -10,6 +10,16 @@ env: NIGHTLY_RELEASE_DIR: build/release jobs: + prepare-release: + runs-on: ubuntu-latest + steps: + - name: Publish readme + 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-nightly-release: runs-on: ${{ matrix.os }} env: @@ -49,18 +59,11 @@ jobs: run: | cross 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 }} - 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: Upload Nightly Release Assets uses: softprops/action-gh-release@v1 env: