ci: Test full GH release

This commit is contained in:
2025-09-14 16:44:12 -06:00
parent c6bf2e10db
commit cc5d4cd45d
+210 -350
View File
@@ -18,143 +18,142 @@ on:
- major - major
jobs: jobs:
################################################# TODO Uncomment job bump-version:
# bump-version: name: bump-version
# name: bump-version runs-on: ubuntu-latest
# runs-on: ubuntu-latest steps:
# steps: - name: Configure SSH for Git
# - name: Configure SSH for Git if: env.ACT != 'true'
# if: env.ACT != 'true' run: |
# run: | mkdir -p ~/.ssh
# mkdir -p ~/.ssh echo "${{ secrets.RELEASE_BOT_SSH_KEY }}" > ~/.ssh/id_ed25519
# echo "${{ secrets.RELEASE_BOT_SSH_KEY }}" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
# chmod 600 ~/.ssh/id_ed25519 ssh-keyscan -H github.com >> ~/.ssh/known_hosts
# ssh-keyscan -H github.com >> ~/.ssh/known_hosts
# - name: Checkout repository
# - name: Checkout repository if: env.ACT != 'true'
# if: env.ACT != 'true' uses: actions/checkout@v3
# uses: actions/checkout@v3 with:
# with: ssh-key: ${{ secrets.RELEASE_BOT_SSH_KEY }}
# ssh-key: ${{ secrets.RELEASE_BOT_SSH_KEY }} fetch-depth: 0
# fetch-depth: 0
# - name: Checkout repository
# - name: Checkout repository if: env.ACT == 'true'
# if: env.ACT == 'true' uses: actions/checkout@v3
# uses: actions/checkout@v3 with:
# with: fetch-depth: 0
# fetch-depth: 0
# - name: Set up Python
# - name: Set up Python uses: actions/setup-python@v4
# uses: actions/setup-python@v4 with:
# with: python-version: "3.10"
# python-version: "3.10"
# - name: Install Commitizen
# - name: Install Commitizen run: |
# run: | python -m pip install --upgrade pip
# python -m pip install --upgrade pip pip install commitizen
# pip install commitizen npm install -g conventional-changelog-cli
# npm install -g conventional-changelog-cli
# - name: Configure Git user
# - name: Configure Git user run: |
# run: | git config user.name "github-actions[bot]"
# git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com"
# git config user.email "github-actions[bot]@users.noreply.github.com"
# - name: Bump version with Commitizen
# - name: Bump version with Commitizen run: |
# run: | cz bump --yes --increment ${{ github.event.inputs.bump_type }}
# cz bump --yes --increment ${{ github.event.inputs.bump_type }}
# - name: Amend commit message to include '[skip ci]'
# - name: Amend commit message to include '[skip ci]' run: |
# run: | git commit --amend --no-edit -m "$(git log -1 --pretty=%B) [skip ci]"
# git commit --amend --no-edit -m "$(git log -1 --pretty=%B) [skip ci]"
# - name: Install Rust stable
# - name: Install Rust stable uses: dtolnay/rust-toolchain@stable
# uses: dtolnay/rust-toolchain@stable
# - name: Get the new version tag
# - name: Get the new version tag id: version
# id: version run: |
# run: | mkdir -p artifacts
# mkdir -p artifacts NEW_TAG=$(cz version --project)
# NEW_TAG=$(cz version --project) echo "New version: $NEW_TAG"
# echo "New version: $NEW_TAG" echo "version=$NEW_TAG" >> $GITHUB_ENV
# echo "version=$NEW_TAG" >> $GITHUB_ENV echo "$NEW_TAG" > artifacts/release-version
# echo "$NEW_TAG" > artifacts/release-version
# - name: Get the previous version tag
# - name: Get the previous version tag id: prev_version
# id: prev_version run: |
# run: | PREV_TAG=$(git describe --tags --abbrev=0 ${GITHUB_SHA}^)
# PREV_TAG=$(git describe --tags --abbrev=0 ${GITHUB_SHA}^) echo "Previous tag: $PREV_TAG"
# echo "Previous tag: $PREV_TAG" echo "prev_version=$PREV_TAG" >> $GITHUB_ENV
# echo "prev_version=$PREV_TAG" >> $GITHUB_ENV
# - name: Bump Cargo.toml version
# - name: Bump Cargo.toml version shell: bash
# shell: bash working-directory: ${{ github.workspace }}
# working-directory: ${{ github.workspace }} env:
# env: VERSION: ${{ env.version }}
# VERSION: ${{ env.version }} run: |
# run: | set -euo pipefail
# set -euo pipefail : "${VERSION:?env.version is empty}"
# : "${VERSION:?env.version is empty}"
# # Ignore Act's local artifact dir noise
# # Ignore Act's local artifact dir noise echo artifacts/ >> .git/info/exclude || true
# echo artifacts/ >> .git/info/exclude || true
# # Edit the version line right after name="gman"
# # Edit the version line right after name="gman" sed -E -i '
# sed -E -i ' /^[[:space:]]*name[[:space:]]*=[[:space:]]*"gman"[[:space:]]*$/ {
# /^[[:space:]]*name[[:space:]]*=[[:space:]]*"gman"[[:space:]]*$/ { n
# n s|^[[:space:]]*version[[:space:]]*=[[:space:]]*"[^"]*"|version = "'"$VERSION"'"|
# s|^[[:space:]]*version[[:space:]]*=[[:space:]]*"[^"]*"|version = "'"$VERSION"'"| }
# } ' Cargo.toml
# ' Cargo.toml
# cargo update || true
# cargo update || true
# # Git config that helps in Act
# # Git config that helps in Act git config user.name "github-actions[bot]"
# git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com"
# git config user.email "github-actions[bot]@users.noreply.github.com" git config --global --add safe.directory "$GITHUB_WORKSPACE"
# git config --global --add safe.directory "$GITHUB_WORKSPACE"
# git status --porcelain
# git status --porcelain git diff --name-only -- Cargo.toml Cargo.lock || true
# git diff --name-only -- Cargo.toml Cargo.lock || true
# if ! git diff --quiet -- Cargo.toml Cargo.lock; then
# if ! git diff --quiet -- Cargo.toml Cargo.lock; then git add -u -- Cargo.toml Cargo.lock
# git add -u -- Cargo.toml Cargo.lock git commit -m "chore: bump Cargo.toml to $VERSION"
# git commit -m "chore: bump Cargo.toml to $VERSION" else
# else echo "No changes to commit (already at $VERSION)"
# echo "No changes to commit (already at $VERSION)" fi
# fi
# - name: Generate changelog for the version bump
# - name: Generate changelog for the version bump id: changelog
# id: changelog run: |
# run: | changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s --from ${{ env.prev_version }} --to ${{ env.version }})
# changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s --from ${{ env.prev_version }} --to ${{ env.version }}) echo "$changelog" > artifacts/changelog.md
# echo "$changelog" > artifacts/changelog.md echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
# echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
# - name: Push changes
# - name: Push changes if: env.ACT != 'true'
# if: env.ACT != 'true' env:
# env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: |
# run: | git push origin --follow-tags
# git push origin --follow-tags
# - name: Upload artifacts
# - name: Upload artifacts uses: actions/upload-artifact@v4
# uses: actions/upload-artifact@v4 with:
# with: path: artifacts
# path: artifacts
# - name: Upload the changed Cargo files (Act)
# - name: Upload the changed Cargo files (Act) if: env.ACT == 'true'
# if: env.ACT == 'true' uses: actions/upload-artifact@v4
# uses: actions/upload-artifact@v4 with:
# with: name: bumped-cargo-files
# name: bumped-cargo-files path: |
# path: | Cargo.toml
# Cargo.toml Cargo.lock
# Cargo.lock
build-release-artifacts: build-release-artifacts:
name: build-release name: build-release
# needs: [bump-version] ## TODO uncomment needs: [bump-version]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
@@ -166,42 +165,32 @@ jobs:
- target: aarch64-unknown-linux-musl - target: aarch64-unknown-linux-musl
os: ubuntu-latest os: ubuntu-latest
use-cross: true use-cross: true
artifact-suffix: aarch64-musl
cargo-flags: "" cargo-flags: ""
- target: aarch64-apple-darwin - target: aarch64-apple-darwin
os: macos-latest os: macos-latest
use-cross: true use-cross: true
artifact-suffix: macos-arm64
cargo-flags: "" cargo-flags: ""
- target: aarch64-pc-windows-msvc - target: aarch64-pc-windows-msvc
os: windows-latest os: windows-latest
use-cross: true use-cross: true
artifact-suffix: windows-aarch64
cargo-flags: "" cargo-flags: ""
- target: x86_64-apple-darwin - target: x86_64-apple-darwin
os: macos-latest os: macos-latest
artifact-suffix: macos
cargo-flags: "" cargo-flags: ""
- target: x86_64-pc-windows-msvc - target: x86_64-pc-windows-msvc
os: windows-latest os: windows-latest
artifact-suffix: windows
cargo-flags: "" cargo-flags: ""
- target: x86_64-unknown-linux-musl - target: x86_64-unknown-linux-musl
os: ubuntu-latest os: ubuntu-latest
artifact-suffix: linux-musl
use-cross: true use-cross: true
cargo-flags: "" cargo-flags: ""
# prettier-ignore
# job:
# - { name: "macOS-arm64", os: "macOS-latest", target: "aarch64-apple-darwin", artifact_suffix: "macos-arm64", use-cross: true }
# - { name: "macOS-amd64", os: "macOS-latest", target: "x86_64-apple-darwin", artifact_suffix: "macos" }
# - { name: "windows-amd64", os: "windows-latest", target: "x86_64-pc-windows-msvc", artifact_suffix: "windows" }
# - { name: "windows-aarch64", os: "windows-latest", target: "aarch64-pc-windows-msvc", artifact_suffix: "windows-aarch64", use-cross: true }
# - { name: "linux-gnu", os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu", artifact_suffix: "linux" }
# - { name: "linux-musl", os: "ubuntu-latest", target: "x86_64-unknown-linux-musl", artifact_suffix: "linux-musl", use-cross: true, }
# - { name: "linux-aarch64-gnu", os: "ubuntu-latest", target: "aarch64-unknown-linux-gnu", artifact_suffix: "aarch64-gnu", use-cross: true, test-bin: "--bin gman" }
# - { name: "linux-aarch64-musl", os: "ubuntu-latest", target: "aarch64-unknown-linux-musl", artifact_suffix: "aarch64-musl", use-cross: true, test-bin: "--bin gman" }
# - { name: "linux-arm-gnu", os: "ubuntu-latest", target: "arm-unknown-linux-gnueabi", artifact_suffix: "armv6-gnu", use-cross: true, test-bin: "--bin gman" }
# - { name: "linux-arm-musl", os: "ubuntu-latest", target: "arm-unknown-linux-musleabihf", artifact_suffix: "armv6-musl", use-cross: true, test-bin: "--bin gman" }
# - { name: "linux-armv7-gnu", os: "ubuntu-latest", target: "armv7-unknown-linux-gnueabihf", artifact_suffix: "armv7-gnu", use-cross: true, test-bin: "--bin gman" }
# - { name: "linux-armv7-musl", os: "ubuntu-latest", target: "armv7-unknown-linux-musleabihf", artifact_suffix: "armv7-musl", use-cross: true, test-bin: "--bin gman" }
# rust: [stable]
steps: steps:
- name: Check if actor is repository owner - name: Check if actor is repository owner
if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }} if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }}
@@ -220,39 +209,42 @@ jobs:
git fetch --all git fetch --all
git pull git pull
## TODO Uncomment for sure - name: Download all artifacts
# - name: Get bumped Cargo files (Act) uses: actions/download-artifact@v4
# if: env.ACT == 'true' with:
# uses: actions/download-artifact@v4 path: artifacts
# with: merge-multiple: true
# name: bumped-cargo-files
# path: ${{ github.workspace }}
# - uses: actions/cache@v3 - name: Ensure repository is up-to-date
# name: Cache Cargo registry if: env.ACT != 'true'
# with: run: |
# path: ~/.cargo/registry git fetch --all
# key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} git pull
# - uses: actions/cache@v3 - name: Set environment variables
# if: startsWith(matrix.job.name, 'linux-') run: |
# with: release_version="$(cat ./artifacts/release-version)"
# path: ~/.cargo/bin echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
# key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }} changelog_body="$(cat ./artifacts/changelog.md)"
echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
- name: Validate release environment variables
run: |
echo "Release version: ${{ env.RELEASE_VERSION }}"
echo "Changelog body: ${{ env.changelog_body }}"
- name: Get bumped Cargo files (Act)
if: env.ACT == 'true'
uses: actions/download-artifact@v4
with:
name: bumped-cargo-files
path: ${{ github.workspace }}
- uses: dtolnay/rust-toolchain@stable - uses: dtolnay/rust-toolchain@stable
name: Set Rust toolchain name: Set Rust toolchain
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}
# - uses: taiki-e/setup-cross-toolchain-action@v1
# with:
# NB: sets CARGO_BUILD_TARGET evar - do not need --target flag in build
# target: ${{ matrix.job.target }}
# - uses: taiki-e/install-action@cross
# if: ${{ matrix.job.use-cross }}
- name: Install cross - name: Install cross
if: matrix.use-cross if: matrix.use-cross
uses: taiki-e/install-action@v2 uses: taiki-e/install-action@v2
@@ -275,93 +267,6 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install -y libclang-20-dev libclang-dev sudo apt-get install -y libclang-20-dev libclang-dev
# Make libclang discoverable by bindgen/clang-sys
# - name: Export LIBCLANG_PATH
# if: matrix.os == 'ubuntu-latest'
# run: |
# echo "LIBCLANG_PATH=$(llvm-config-20 --libdir)" >> "$GITHUB_ENV"
# ls -l "$LIBCLANG_PATH"/libclang*.so || true
# - name: Installing needed Ubuntu dependencies
# if: matrix.os == 'ubuntu-latest'
# shell: bash
# run: |
# sudo apt-get -y update
# case ${{ matrix.target }} in
# arm*-linux-*) sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
# aarch64-*-linux-*) sudo apt-get -y install gcc-aarch64-linux-gnu ;;
# esac
#
# - name: Install clang + bindgen for musl targets
# if: matrix.job.os == 'ubuntu-latest'
# shell: bash
# run: |
# set -euxo pipefail
# sudo apt-get -y update
# sudo apt-get -y install clang llvm-dev libclang-dev pkg-config cmake make build-essential musl-tools
# # force install to avoid stale cache issues
# cargo install --force --locked bindgen-cli
# echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# # help bindgen find libclang
# echo "LIBCLANG_PATH=$(llvm-config --libdir)" >> "$GITHUB_ENV"
# # quick visibility checks (fail early if missing)
# which bindgen
# bindgen --version
# clang --version
#
# - name: Configure bindgen target flags for musl cross-compile
# if: matrix.job.os == 'ubuntu-latest' && contains(matrix.job.target, 'musl')
# shell: bash
# run: |
# set -euo pipefail
# triple='${{ matrix.job.target }}'
# # Bindgen needs explicit target to avoid host header confusion
# echo "BINDGEN_EXTRA_CLANG_ARGS_${triple//-/_}=--target=$triple" >> "$GITHUB_ENV"
# # CC hints help any C sub-builds in the tree
# case "$triple" in
# x86_64-unknown-linux-musl)
# echo "CC_x86_64_unknown_linux_musl=musl-gcc" >> "$GITHUB_ENV"
# ;;
# aarch64-unknown-linux-musl)
# echo "CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc" >> "$GITHUB_ENV"
# ;;
# arm-unknown-linux-musleabihf)
# echo "CC_arm_unknown_linux_musleabihf=arm-linux-musleabihf-gcc" >> "$GITHUB_ENV"
# ;;
# armv7-unknown-linux-musleabihf)
# echo "CC_armv7_unknown_linux_musleabihf=armv7-linux-musleabihf-gcc" >> "$GITHUB_ENV"
# ;;
# esac
# echo "PKG_CONFIG_ALLOW_CROSS=1" >> "$GITHUB_ENV"
#
# - name: OpenSSL (vendored) toolchain for musl
# if: startsWith(matrix.job.name, 'linux-') && contains(matrix.job.target, 'musl')
# shell: bash
# run: |
# # Tools needed for building vendored OpenSSL
# sudo apt-get -y update
# sudo apt-get -y install musl-tools pkg-config perl make cmake
#
# # Let openssl-sys know we're cross-compiling and want static
# echo "OPENSSL_STATIC=1" >> $GITHUB_ENV
# echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
#
# # Set the right C compiler per musl target (some provided by taiki-e/setup-cross-toolchain-action)
# case "${{ matrix.job.target }}" in
# x86_64-unknown-linux-musl)
# echo "CC_x86_64_unknown_linux_musl=musl-gcc" >> $GITHUB_ENV
# ;;
# aarch64-unknown-linux-musl)
# # If your toolchain action installs aarch64-linux-musl-gcc, use that:
# echo "CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc" >> $GITHUB_ENV
# ;;
# arm-unknown-linux-musleabihf)
# echo "CC_arm_unknown_linux_musleabihf=arm-linux-musleabihf-gcc" >> $GITHUB_ENV
# ;;
# armv7-unknown-linux-musleabihf)
# echo "CC_armv7_unknown_linux_musleabihf=armv7-linux-musleabihf-gcc" >> $GITHUB_ENV
# ;;
# esac
- name: Show Version Information (Rust, cargo, GCC) - name: Show Version Information (Rust, cargo, GCC)
shell: bash shell: bash
run: | run: |
@@ -372,74 +277,6 @@ jobs:
cargo -V cargo -V
rustc -V rustc -V
# - name: Build
# shell: bash
# run: |
# set -euxo pipefail
# cross build --release --target=${{ matrix.job.target }}
# # if [[ "${{ matrix.job.use-cross || 'false' }}" == 'true' ]]; then
# # cross build --release --locked --target=${{ matrix.job.target }} --verbose
# # else
# # cargo build --release --locked --target=${{ matrix.job.target }} --verbose
# # fi
#
# - name: Verify file
# shell: bash
# run: |
# file target/${{ matrix.job.target }}/release/gman
#
# - name: Test
# if: matrix.job.target != 'aarch64-apple-darwin' && matrix.job.target != 'aarch64-pc-windows-msvc'
# shell: bash
# run: |
# set -euxo pipefail
# if [[ "${{ matrix.job.use-cross || 'false' }}" == 'true' ]]; then
# cross test --release --locked --target=${{ matrix.job.target }} --verbose ${{ matrix.job.test-bin }}
# else
# cargo test --release --locked --target=${{ matrix.job.target }} --verbose ${{ matrix.job.test-bin }}
# fi
#
# - name: Test
# if: matrix.job.target != 'aarch64-apple-darwin' && matrix.job.target != 'aarch64-pc-windows-msvc'
# run: cargo test --release --verbose --target=${{ matrix.job.target }} ${{ matrix.job.test-bin }}
#
# - name: Packaging final binary (Windows)
# if: matrix.job.os == 'windows-latest'
# shell: bash
# run: |
# cd target/${{ matrix.job.target }}/release
# BINARY_NAME=gman.exe
# if [ "${{ matrix.job.target }}" != "aarch64-pc-windows-msvc" ]; then
# # strip the binary
# strip $BINARY_NAME
# fi
# RELEASE_NAME=gman-${{ matrix.job.artifact_suffix }}
# mkdir -p artifacts
# tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
# # create sha checksum files
# certutil -hashfile $RELEASE_NAME.tar.gz sha256 | grep -E [A-Fa-f0-9]{64} > $RELEASE_NAME.sha256
# echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
#
# - name: Packaging final binary (macOS and Linux)
# if: matrix.job.os != 'windows-latest'
# shell: bash
# run: |
# # set the right strip executable
# STRIP="strip";
# case ${{ matrix.job.target }} in
# arm*-linux-*) STRIP="arm-linux-gnueabihf-strip" ;;
# aarch64-*-linux-*) STRIP="aarch64-linux-gnu-strip" ;;
# esac;
# cd target/${{ matrix.job.target }}/release
# BINARY_NAME=gman
# # strip the binary
# "$STRIP" "$BINARY_NAME"
# RELEASE_NAME=gman-${{ matrix.job.artifact_suffix }}
# tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
# # create sha checksum files
# shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
# echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
- name: Build - name: Build
shell: bash shell: bash
run: $BUILD_CMD build --locked --release --target=${{ matrix.target }} ${{ matrix.cargo-flags }} run: $BUILD_CMD build --locked --release --target=${{ matrix.target }} ${{ matrix.cargo-flags }}
@@ -449,7 +286,7 @@ jobs:
id: package id: package
env: env:
target: ${{ matrix.target }} target: ${{ matrix.target }}
version: ${{ steps.check-tag.outputs.version }} version: ${{ env.RELEASE_VERSION }}
run: | run: |
set -euxo pipefail set -euxo pipefail
@@ -468,34 +305,57 @@ jobs:
if [[ "$RUNNER_OS" == "Windows" ]]; then if [[ "$RUNNER_OS" == "Windows" ]]; then
archive=$dist_dir/$name.zip archive=$dist_dir/$name.zip
sha=$dist_dir/$name.sha256
7z a $archive * 7z a $archive *
certutil -hashfile $archive sha256 | grep -E [A-Fa-f0-9]{64} > $sha
echo "archive=dist/$name.zip" >> $GITHUB_OUTPUT echo "archive=dist/$name.zip" >> $GITHUB_OUTPUT
echo "sha=dist/$name.sha256" >> $GITHUB_OUTPUT
else else
archive=$dist_dir/$name.tar.gz archive=$dist_dir/$name.tar.gz
sha=$dist_dir/$name.sha256
tar -czf $archive * tar -czf $archive *
shasum -a 256 $archive > $sha
echo "archive=dist/$name.tar.gz" >> $GITHUB_OUTPUT echo "archive=dist/$name.tar.gz" >> $GITHUB_OUTPUT
echo "sha=dist/$name.sha256" >> $GITHUB_OUTPUT
fi fi
# - name: Publish Archive # - name: Test
# uses: softprops/action-gh-release@v2 # if: matrix.target != 'aarch64-apple-darwin' && matrix.target != 'aarch64-pc-windows-msvc'
# if: ${{ startsWith(github.ref, 'refs/tags/') }} # shell: bash
# with:
# draft: false
# files: ${{ steps.package.outputs.archive }}
# prerelease: ${{ steps.check-tag.outputs.rc == 'true' }}
# - name: Add artifacts
# run: | # run: |
# mkdir -p artifacts # set -euxo pipefail
# cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.tar.gz artifacts/ # if [[ "${{ matrix.use-cross || 'false' }}" == 'true' ]]; then
# cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.sha256 artifacts/ # cross test --release --locked --target=${{ matrix.target }} --verbose
# # else
# - name: Upload artifacts # cargo test --release --locked --target=${{ matrix.target }} --verbose
# uses: actions/upload-artifact@v4 # fi
# with:
# name: artifacts-${{ env.RELEASE_NAME }} - name: Publish Archive
# path: artifacts if: env.ACT != 'true'
# overwrite: true uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
files: ${{ steps.package.outputs.archive }} ${{ steps.package.outputs.sha }}
tag_name: v${{ env.RELEASE_VERSION }}
name: "v${{ env.RELEASE_VERSION }}"
body: ${{ env.changelog_body }}
draft: false
prerelease: false
- name: Add artifacts
run: |
mkdir -p artifacts
cp ${{ steps.package.outputs.archive }} artifacts/
cp ${{ steps.package.outputs.sha }} artifacts/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ env.RELEASE_NAME }}
path: artifacts
overwrite: true
## TODO Uncomment for sure ## TODO Uncomment for sure