Release 0.1.0
Release / package_gnu (deb) (push) Failing after 39s
Release / package_musl (deb) (push) Failing after 26s
Release / package_gnu (rpm) (push) Failing after 40s
Release / package_musl (rpm) (push) Failing after 29s
Release / build_windows (push) Successful in 3m57s
Release / publish-release (push) Has been skipped
Release / check-release (push) Successful in 9s
CI / Test (push) Successful in 1m51s
CI / Build Linux (push) Successful in 1m51s
Release / build_gnu (push) Successful in 2m54s
Release / build_musl (push) Successful in 3m5s
Release / package_gnu (deb) (push) Failing after 39s
Release / package_musl (deb) (push) Failing after 26s
Release / package_gnu (rpm) (push) Failing after 40s
Release / package_musl (rpm) (push) Failing after 29s
Release / build_windows (push) Successful in 3m57s
Release / publish-release (push) Has been skipped
Release / check-release (push) Successful in 9s
CI / Test (push) Successful in 1m51s
CI / Build Linux (push) Successful in 1m51s
Release / build_gnu (push) Successful in 2m54s
Release / build_musl (push) Successful in 3m5s
This commit is contained in:
+134
-68
@@ -23,107 +23,168 @@ jobs:
|
|||||||
echo "match=false" >> $GITHUB_OUTPUT
|
echo "match=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build_executable:
|
build_gnu:
|
||||||
needs: check-release
|
needs: check-release
|
||||||
if: needs.check-release.outputs.match == 'true'
|
if: needs.check-release.outputs.match == 'true'
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- target: x86_64-unknown-linux-gnu
|
|
||||||
binary: convertis
|
|
||||||
- target: x86_64-pc-windows-gnu
|
|
||||||
binary: convertis.exe
|
|
||||||
- target: x86_64-unknown-linux-musl
|
|
||||||
binary: convertis
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: Checkout repo
|
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
name: Set up Rust Toolchain
|
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: x86_64-unknown-linux-gnu
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --release --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- name: Rename Raw Executable
|
||||||
|
run: cp target/x86_64-unknown-linux-gnu/release/convertis convertis-x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- name: Upload Binary for Packaging
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build-gnu
|
||||||
|
path: target/x86_64-unknown-linux-gnu/release/convertis
|
||||||
|
|
||||||
|
- name: Upload Raw Executable Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: raw-gnu
|
||||||
|
path: convertis-x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
build_musl:
|
||||||
|
needs: check-release
|
||||||
|
if: needs.check-release.outputs.match == 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: x86_64-unknown-linux-musl
|
||||||
- name: Install cross-platform linkers
|
- name: Install cross-platform linkers
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
if [ "${{ matrix.target }}" = "x86_64-pc-windows-gnu" ]; then
|
sudo apt-get install -y musl-tools
|
||||||
sudo apt-get install -y mingw-w64
|
|
||||||
elif [ "${{ matrix.target }}" = "x86_64-unknown-linux-musl" ]; then
|
|
||||||
sudo apt-get install -y musl-tools
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --release --target ${{ matrix.target }}
|
run: cargo build --release --target x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
- name: Rename Raw Executable
|
||||||
|
run: cp target/x86_64-unknown-linux-musl/release/convertis convertis-x86_64-unknown-linux-musl
|
||||||
|
|
||||||
- name: Upload Executable Artifact
|
- name: Upload Binary for Packaging
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bin-${{ matrix.target }}
|
name: build-musl
|
||||||
path: target/${{ matrix.target }}/release/${{ matrix.binary }}
|
path: target/x86_64-unknown-linux-musl/release/convertis
|
||||||
|
|
||||||
build_package:
|
- name: Upload Raw Executable Artifact
|
||||||
needs: build_executable
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: raw-musl
|
||||||
|
path: convertis-x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
build_windows:
|
||||||
|
needs: check-release
|
||||||
if: needs.check-release.outputs.match == 'true'
|
if: needs.check-release.outputs.match == 'true'
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- type: deb-gnu
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
- type: deb-musl
|
|
||||||
target: x86_64-unknown-linux-musl
|
|
||||||
- type: rpm-gnu
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
- type: rpm-musl
|
|
||||||
target: x86_64-unknown-linux-musl
|
|
||||||
- type: exe
|
|
||||||
target: x86_64-pc-windows-gnu
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: x86_64-pc-windows-gnu
|
||||||
|
- name: Install cross-platform linkers
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y mingw-w64
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --release --target x86_64-pc-windows-gnu
|
||||||
|
|
||||||
|
- name: Upload Raw Executable Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: raw-windows
|
||||||
|
path: target/x86_64-pc-windows-gnu/release/convertis.exe
|
||||||
|
|
||||||
|
package_gnu:
|
||||||
|
needs: [check-release, build_gnu]
|
||||||
|
if: needs.check-release.outputs.match == 'true'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
type: [deb, rpm]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
- name: Download compiled binary
|
- name: Download compiled binary
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bin-${{ matrix.target }}
|
name: build-gnu
|
||||||
path: target/${{ matrix.target }}/release/
|
path: target/x86_64-unknown-linux-gnu/release/
|
||||||
|
|
||||||
- name: Install deb build dependencies
|
- name: Install build dependencies
|
||||||
if: startsWith(matrix.type, 'deb-')
|
run: |
|
||||||
run: cargo install cargo-deb
|
if [ "${{ matrix.type }}" = "deb" ]; then
|
||||||
|
cargo install cargo-deb
|
||||||
|
elif [ "${{ matrix.type }}" = "rpm" ]; then
|
||||||
|
cargo install cargo-generate-rpm
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install rpm build dependencies
|
- name: Build package
|
||||||
if: startsWith(matrix.type, 'rpm-')
|
|
||||||
run: cargo install cargo-generate-rpm
|
|
||||||
|
|
||||||
- name: Build deb
|
|
||||||
if: startsWith(matrix.type, 'deb-')
|
|
||||||
run: cargo deb --no-build --target ${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Build rpm
|
|
||||||
if: startsWith(matrix.type, 'rpm-')
|
|
||||||
run: cargo generate-rpm --target-dir target/${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Gather packages for upload
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist/
|
mkdir -p dist/
|
||||||
if [ "${{ matrix.type }}" = "exe" ]; then
|
if [ "${{ matrix.type }}" = "deb" ]; then
|
||||||
cp target/${{ matrix.target }}/release/convertis.exe dist/
|
cargo deb --no-build --target x86_64-unknown-linux-gnu
|
||||||
elif [[ "${{ matrix.type }}" == deb-* ]]; then
|
cp target/x86_64-unknown-linux-gnu/debian/*.deb dist/
|
||||||
cp target/${{ matrix.target }}/debian/*.deb dist/
|
elif [ "${{ matrix.type }}" = "rpm" ]; then
|
||||||
elif [[ "${{ matrix.type }}" == rpm-* ]]; then
|
cargo generate-rpm --target-dir target/x86_64-unknown-linux-gnu
|
||||||
cp target/${{ matrix.target }}/generate-rpm/*.rpm dist/
|
cp target/x86_64-unknown-linux-gnu/generate-rpm/*.rpm dist/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload Package Artifact
|
- name: Upload Package Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: pkg-${{ matrix.type }}
|
name: pkg-${{ matrix.type }}-gnu
|
||||||
|
path: dist/*
|
||||||
|
|
||||||
|
package_musl:
|
||||||
|
needs: [check-release, build_musl]
|
||||||
|
if: needs.check-release.outputs.match == 'true'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
type: [deb, rpm]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Download compiled binary
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build-musl
|
||||||
|
path: target/x86_64-unknown-linux-musl/release/
|
||||||
|
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
if [ "${{ matrix.type }}" = "deb" ]; then
|
||||||
|
cargo install cargo-deb
|
||||||
|
elif [ "${{ matrix.type }}" = "rpm" ]; then
|
||||||
|
cargo install cargo-generate-rpm
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: |
|
||||||
|
mkdir -p dist/
|
||||||
|
if [ "${{ matrix.type }}" = "deb" ]; then
|
||||||
|
cargo deb --no-build --target x86_64-unknown-linux-musl
|
||||||
|
cp target/x86_64-unknown-linux-musl/debian/*.deb dist/
|
||||||
|
elif [ "${{ matrix.type }}" = "rpm" ]; then
|
||||||
|
cargo generate-rpm --target-dir target/x86_64-unknown-linux-musl
|
||||||
|
cp target/x86_64-unknown-linux-musl/generate-rpm/*.rpm dist/
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload Package Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: pkg-${{ matrix.type }}-musl
|
||||||
path: dist/*
|
path: dist/*
|
||||||
|
|
||||||
publish-release:
|
publish-release:
|
||||||
needs: [check-release, build_package]
|
needs: [check-release, build_windows, package_gnu, package_musl]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -132,11 +193,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download All Packages
|
- name: Download All Artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: all-packages/
|
path: all-packages/
|
||||||
|
|
||||||
|
- name: Cleanup internal build artifacts
|
||||||
|
run: |
|
||||||
|
rm -rf all-packages/build-gnu
|
||||||
|
rm -rf all-packages/build-musl
|
||||||
|
|
||||||
- name: Generate Changelog
|
- name: Generate Changelog
|
||||||
run: |
|
run: |
|
||||||
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
||||||
@@ -162,6 +228,6 @@ jobs:
|
|||||||
tag_name: v${{ needs.check-release.outputs.version }}
|
tag_name: v${{ needs.check-release.outputs.version }}
|
||||||
name: Release v${{ needs.check-release.outputs.version }}
|
name: Release v${{ needs.check-release.outputs.version }}
|
||||||
body_path: changelog.md
|
body_path: changelog.md
|
||||||
files: all-packages/pkg-*/*
|
files: all-packages/**/*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user