diff --git a/.github/workflows/boil_build_release.yaml b/.github/workflows/boil_pr.yaml similarity index 54% rename from .github/workflows/boil_build_release.yaml rename to .github/workflows/boil_pr.yaml index 45144b31b..774a76eef 100644 --- a/.github/workflows/boil_build_release.yaml +++ b/.github/workflows/boil_pr.yaml @@ -1,16 +1,13 @@ --- -name: Build/Release boil +name: Build boil on: pull_request: paths: - - '.github/workflows/boil_build_release.yaml' - - 'rust-toolchain.toml' - - 'Cargo.*' - - '**.rs' - push: - tags: - - "boil-[0-9]+.[0-9]+.[0-9]+**" + - ".github/workflows/boil_pr.yaml" + - "rust-toolchain.toml" + - "rust/boil/**.rs" + - "Cargo.*" env: RUST_VERSION: 1.87.0 @@ -39,18 +36,6 @@ jobs: with: command: check ${{ matrix.checks }} - create-release: - name: Create Draft Release - if: github.event_name == 'push' - needs: - - cargo-deny - runs-on: ubuntu-latest - steps: - - name: Create Draft Release - uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 - with: - draft: true - build: name: Build boil needs: @@ -59,9 +44,9 @@ jobs: fail-fast: false matrix: targets: - - {target: aarch64-unknown-linux-gnu, os: ubuntu-24.04-arm} - - {target: x86_64-unknown-linux-gnu, os: ubuntu-latest} - - {target: aarch64-apple-darwin, os: macos-latest} + - { target: aarch64-unknown-linux-gnu, os: ubuntu-24.04-arm } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } + - { target: aarch64-apple-darwin, os: macos-latest } runs-on: ${{ matrix.targets.os }} steps: - name: Checkout @@ -77,16 +62,4 @@ jobs: - name: Build Binary env: TARGET: ${{ matrix.targets.target }} - run: cargo build --target "$TARGET" --release --package boil - - - name: Rename Binary - env: - TARGET: ${{ matrix.targets.target }} - run: mv "target/$TARGET/release/boil" "boil-$TARGET" - - - name: Upload Artifact to Release - if: github.event_name == 'push' - uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 - with: - draft: false - files: boil-${{ matrix.targets.target }} + run: cargo build --target "$TARGET" --package boil diff --git a/.github/workflows/boil_release.yaml b/.github/workflows/boil_release.yaml new file mode 100644 index 000000000..72c204f7a --- /dev/null +++ b/.github/workflows/boil_release.yaml @@ -0,0 +1,59 @@ +--- +name: Release boil + +on: + push: + tags: + - "boil-[0-9]+.[0-9]+.[0-9]+**" + +env: + RUST_VERSION: 1.87.0 + +jobs: + create-release: + name: Create Draft Release + runs-on: ubuntu-latest + steps: + - name: Create Draft Release + uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 + with: + draft: true + + build: + name: Build boil + needs: + - create-release + strategy: + fail-fast: false + matrix: + targets: + - { target: aarch64-unknown-linux-gnu, os: ubuntu-24.04-arm } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } + - { target: aarch64-apple-darwin, os: macos-latest } + runs-on: ${{ matrix.targets.os }} + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + + - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 + with: + toolchain: ${{ env.RUST_VERSION }} + targets: ${{ matrix.targets.target }} + + - name: Build Binary + env: + TARGET: ${{ matrix.targets.target }} + run: cargo build --target "$TARGET" --release --package boil + + - name: Rename Binary + env: + TARGET: ${{ matrix.targets.target }} + run: mv "target/$TARGET/release/boil" "boil-$TARGET" + + - name: Upload Artifact to Release + uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 + with: + draft: false + files: boil-${{ matrix.targets.target }} diff --git a/.yamllint.yaml b/.yamllint.yaml index 11dfdcd25..b74d2018b 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -11,3 +11,6 @@ rules: comments: min-spaces-from-content: 1 # Needed due to https://github.com/adrienverge/yamllint/issues/443 indentation: disable + braces: + max-spaces-inside: 1 + max-spaces-inside-empty: 0