Skip to content

updates to ci

updates to ci #4

Workflow file for this run

name: Build and Release
on:
push:
branches:
- "**"
tags-ignore:
- "auto-myrient-*"
pull_request:
env:
CRATE_NAME: auto-myrient
GITHUB_TOKEN: ${{ github.token }}
RUST_BACKTRACE: 1
jobs:
build:
name: Build - ${{ matrix.platform.release_for }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- release_for: Linux-x86_64
os: ubuntu-latest

Check failure on line 24 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
target: x86_64-unknown-linux-musl
bin: oci-tester
name: oci-tester-Linux-x86_64-musl.tar.gz
- release_for: Linux-aarch64
os: ubuntu-latest
target: aarch64-unknown-linux-musl
bin: oci-tester
name: oci-tester-Linux-aarch64-musl.tar.gz
- release_for: Linux-arm
os: ubuntu-latest
target: arm-unknown-linux-musleabi
bin: oci-tester
name: oci-tester-Linux-arm-musl.tar.gz
- release_for: Windows-i686
os: windows-latest
target: i686-pc-windows-msvc
bin: oci-tester.exe
name: oci-tester-Windows-i686.zip
- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: oci-tester.exe
name: oci-tester-Windows-x86_64.zip
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: oci-tester
name: oci-tester-Darwin-x86_64.tar.gz
- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
bin: oci-tester
name: oci-tester-Darwin-aarch64.tar.gz
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
7z a ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
else
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
fi
cd -
if: |
( startsWith( github.ref, 'refs/tags/v' ) ||
startsWith( github.ref, 'refs/tags/rc' ) ||
github.ref == 'refs/tags/test-release' )
- name: Generate SHA-256
run: shasum -a 256 ${{ matrix.platform.name }}
if: |
matrix.platform.os == 'macOS-latest' &&
( startsWith( github.ref, 'refs/tags/v' ) ||
startsWith( github.ref, 'refs/tags/rc' ) ||
github.ref == 'refs/tags/test-release' )
- name: Publish release artifacts
uses: actions/upload-artifact@v4
with:
name: auto-myrient-${{ matrix.platform.os_name }}
path: "auto-myrient-*"
if: github.ref == 'refs/tags/test-release' || startsWith( github.ref, 'refs/tags/v' ) || startsWith( github.ref, 'refs/tags/rc' )
release:
needs: build
if: startsWith( github.ref, 'refs/tags/v' ) || startsWith( github.ref, 'refs/tags/rc' )
name: Release
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: auto-myrient-*
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
draft: true
files: "auto-myrient-*"
body_path: CHANGELOG.md