ci: Final test of corrected release flow for GitHub [skip ci]
This commit is contained in:
+283
-288
@@ -18,298 +18,293 @@ on:
|
|||||||
- major
|
- major
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# build-release-artifacts:
|
bump-version:
|
||||||
# name: build-release
|
name: bump-version
|
||||||
# runs-on: ${{ matrix.job.os }}
|
runs-on: ubuntu-latest
|
||||||
# env:
|
steps:
|
||||||
# RUST_BACKTRACE: 1
|
- name: Configure SSH for Git
|
||||||
# strategy:
|
run: |
|
||||||
# fail-fast: true
|
mkdir -p ~/.ssh
|
||||||
# matrix:
|
echo "${{ secrets.RELEASE_BOT_SSH_KEY }}" > ~/.ssh/id_ed25519
|
||||||
# # prettier-ignore
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
# job:
|
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
|
||||||
# - { 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 managarr" }
|
|
||||||
# - { name: "linux-aarch64-musl", os: "ubuntu-latest", target: "aarch64-unknown-linux-musl", artifact_suffix: "aarch64-musl", use-cross: true, test-bin: "--bin managarr" }
|
|
||||||
# - { name: "linux-arm-gnu", os: "ubuntu-latest", target: "arm-unknown-linux-gnueabi", artifact_suffix: "armv6-gnu", use-cross: true, test-bin: "--bin managarr" }
|
|
||||||
# - { name: "linux-arm-musl", os: "ubuntu-latest", target: "arm-unknown-linux-musleabihf", artifact_suffix: "armv6-musl", use-cross: true, test-bin: "--bin managarr" }
|
|
||||||
# - { name: "linux-armv7-gnu", os: "ubuntu-latest", target: "armv7-unknown-linux-gnueabihf", artifact_suffix: "armv7-gnu", use-cross: true, test-bin: "--bin managarr" }
|
|
||||||
# - { name: "linux-armv7-musl", os: "ubuntu-latest", target: "armv7-unknown-linux-musleabihf", artifact_suffix: "armv7-musl", use-cross: true, test-bin: "--bin managarr" }
|
|
||||||
# rust: [stable]
|
|
||||||
|
|
||||||
# steps:
|
- name: Checkout repository
|
||||||
# - name: Check if actor is repository owner
|
uses: actions/checkout@v3
|
||||||
# if: ${{ github.actor != github.repository_owner }}
|
with:
|
||||||
# run: |
|
ssh-key: ${{ secrets.RELEASE_BOT_SSH_KEY }}
|
||||||
# echo "You are not authorized to run this workflow."
|
fetch-depth: 0
|
||||||
# exit 1
|
|
||||||
|
|
||||||
# - name: Checkout repository
|
- name: Set up Python
|
||||||
# uses: actions/checkout@v4
|
uses: actions/setup-python@v4
|
||||||
# with:
|
with:
|
||||||
# fetch-depth: 1
|
python-version: "3.10"
|
||||||
|
|
||||||
# - uses: actions/cache@v3
|
- name: Install Commitizen
|
||||||
# name: Cache Cargo registry
|
run: |
|
||||||
# with:
|
python -m pip install --upgrade pip
|
||||||
# path: ~/.cargo/registry
|
pip install commitizen
|
||||||
# key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
|
npm install -g conventional-changelog-cli
|
||||||
|
|
||||||
# - uses: actions/cache@v3
|
- name: Configure Git user
|
||||||
# if: startsWith(matrix.job.name, 'linux-')
|
run: |
|
||||||
# with:
|
git config user.name "github-actions[bot]"
|
||||||
# path: ~/.cargo/bin
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
# key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }}
|
|
||||||
|
|
||||||
# - uses: dtolnay/rust-toolchain@stable
|
- name: Bump version with Commitizen
|
||||||
# name: Set Rust toolchain
|
run: |
|
||||||
# with:
|
cz bump --yes --increment ${{ github.event.inputs.bump_type }}
|
||||||
# targets: ${{ matrix.job.target }}
|
|
||||||
|
|
||||||
# - uses: taiki-e/setup-cross-toolchain-action@v1
|
- name: Amend commit message to include '[skip ci]'
|
||||||
# with:
|
run: |
|
||||||
# # NB: sets CARGO_BUILD_TARGET evar - do not need --target flag in build
|
git commit --amend --no-edit -m "$(git log -1 --pretty=%B) [skip ci]"
|
||||||
# target: ${{ matrix.job.target }}
|
|
||||||
|
|
||||||
# - uses: taiki-e/install-action@cross
|
- name: Install Rust stable
|
||||||
# if: ${{ matrix.job.use-cross }}
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
# - name: Installing needed Ubuntu dependencies
|
- name: Update the Cargo.lock
|
||||||
# if: matrix.job.os == 'ubuntu-latest'
|
run: |
|
||||||
# shell: bash
|
cargo update
|
||||||
# run: |
|
git add Cargo.lock
|
||||||
# sudo apt-get -y update
|
git commit -m "chore: Bump the version in Cargo.lock"
|
||||||
# case ${{ matrix.job.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: Build
|
- name: Get the new version tag
|
||||||
# run: cargo build --release --verbose --target=${{ matrix.job.target }} --locked
|
id: version
|
||||||
|
run: |
|
||||||
|
mkdir -p artifacts
|
||||||
|
NEW_TAG=$(cz version --project)
|
||||||
|
echo "New version: $NEW_TAG"
|
||||||
|
echo "version=$NEW_TAG" >> $GITHUB_ENV
|
||||||
|
echo "$NEW_TAG" > artifacts/release-version
|
||||||
|
|
||||||
# - name: Verify file
|
- name: Get the previous version tag
|
||||||
# shell: bash
|
id: prev_version
|
||||||
# run: |
|
run: |
|
||||||
# file target/${{ matrix.job.target }}/release/managarr
|
PREV_TAG=$(git describe --tags --abbrev=0 ${GITHUB_SHA}^)
|
||||||
|
echo "Previous tag: $PREV_TAG"
|
||||||
|
echo "prev_version=$PREV_TAG" >> $GITHUB_ENV
|
||||||
|
|
||||||
# - name: Test
|
- name: Generate changelog for the version bump
|
||||||
# if: matrix.job.target != 'aarch64-apple-darwin' && matrix.job.target != 'aarch64-pc-windows-msvc'
|
id: changelog
|
||||||
# run: cargo test --release --verbose --target=${{ matrix.job.target }} ${{ matrix.job.test-bin }}
|
run: |
|
||||||
|
changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s --from ${{ env.prev_version }} --to ${{ env.version }})
|
||||||
|
echo "$changelog" > artifacts/changelog.md
|
||||||
|
echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
|
||||||
|
|
||||||
# - name: Packaging final binary (Windows)
|
- name: Push changes
|
||||||
# if: matrix.job.os == 'windows-latest'
|
env:
|
||||||
# shell: bash
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# run: |
|
run: |
|
||||||
# cd target/${{ matrix.job.target }}/release
|
git push origin --follow-tags
|
||||||
# BINARY_NAME=managarr.exe
|
|
||||||
# if [ "${{ matrix.job.target }}" != "aarch64-pc-windows-msvc" ]; then
|
|
||||||
# # strip the binary
|
|
||||||
# strip $BINARY_NAME
|
|
||||||
# fi
|
|
||||||
# RELEASE_NAME=managarr-${{ 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)
|
- name: Upload artifacts
|
||||||
# if: matrix.job.os != 'windows-latest'
|
uses: actions/upload-artifact@v3
|
||||||
# shell: bash
|
with:
|
||||||
# run: |
|
name: artifacts
|
||||||
# # set the right strip executable
|
path: artifacts
|
||||||
# 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=managarr
|
|
||||||
# # strip the binary
|
|
||||||
# "$STRIP" "$BINARY_NAME"
|
|
||||||
# RELEASE_NAME=managarr-${{ 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: Add artifacts
|
build-release-artifacts:
|
||||||
# run: |
|
name: build-release
|
||||||
# mkdir -p artifacts
|
needs: [bump-version]
|
||||||
# cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.tar.gz artifacts/
|
runs-on: ${{ matrix.job.os }}
|
||||||
# cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.sha256 artifacts/
|
env:
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
# 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 managarr" }
|
||||||
|
- { name: "linux-aarch64-musl", os: "ubuntu-latest", target: "aarch64-unknown-linux-musl", artifact_suffix: "aarch64-musl", use-cross: true, test-bin: "--bin managarr" }
|
||||||
|
- { name: "linux-arm-gnu", os: "ubuntu-latest", target: "arm-unknown-linux-gnueabi", artifact_suffix: "armv6-gnu", use-cross: true, test-bin: "--bin managarr" }
|
||||||
|
- { name: "linux-arm-musl", os: "ubuntu-latest", target: "arm-unknown-linux-musleabihf", artifact_suffix: "armv6-musl", use-cross: true, test-bin: "--bin managarr" }
|
||||||
|
- { name: "linux-armv7-gnu", os: "ubuntu-latest", target: "armv7-unknown-linux-gnueabihf", artifact_suffix: "armv7-gnu", use-cross: true, test-bin: "--bin managarr" }
|
||||||
|
- { name: "linux-armv7-musl", os: "ubuntu-latest", target: "armv7-unknown-linux-musleabihf", artifact_suffix: "armv7-musl", use-cross: true, test-bin: "--bin managarr" }
|
||||||
|
rust: [stable]
|
||||||
|
|
||||||
# - name: Upload artifacts
|
steps:
|
||||||
# uses: actions/upload-artifact@v3
|
- name: Check if actor is repository owner
|
||||||
# with:
|
if: ${{ github.actor != github.repository_owner }}
|
||||||
# name: artifacts
|
run: |
|
||||||
# path: artifacts
|
echo "You are not authorized to run this workflow."
|
||||||
|
exit 1
|
||||||
|
|
||||||
# bump-version:
|
- name: Checkout repository
|
||||||
# name: bump-version
|
uses: actions/checkout@v4
|
||||||
# needs: [build-release-artifacts]
|
with:
|
||||||
# runs-on: ubuntu-latest
|
fetch-depth: 1
|
||||||
# steps:
|
|
||||||
# - name: Configure SSH for Git
|
|
||||||
# run: |
|
|
||||||
# mkdir -p ~/.ssh
|
|
||||||
# echo "${{ secrets.RELEASE_BOT_SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
||||||
# chmod 600 ~/.ssh/id_ed25519
|
|
||||||
# ssh-keyscan -H github.com >> ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
# - name: Checkout repository
|
- uses: actions/cache@v3
|
||||||
# uses: actions/checkout@v3
|
name: Cache Cargo registry
|
||||||
# with:
|
with:
|
||||||
# ssh-key: ${{ secrets.RELEASE_BOT_SSH_KEY }}
|
path: ~/.cargo/registry
|
||||||
# fetch-depth: 0
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
|
||||||
|
|
||||||
# - name: Download all artifacts
|
- uses: actions/cache@v3
|
||||||
# uses: actions/download-artifact@v3
|
if: startsWith(matrix.job.name, 'linux-')
|
||||||
# with:
|
with:
|
||||||
# name: artifacts
|
path: ~/.cargo/bin
|
||||||
# path: artifacts
|
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }}
|
||||||
|
|
||||||
# - name: Set up Python
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
# uses: actions/setup-python@v4
|
name: Set Rust toolchain
|
||||||
# with:
|
with:
|
||||||
# python-version: "3.10"
|
targets: ${{ matrix.job.target }}
|
||||||
|
|
||||||
# - name: Install Commitizen
|
- uses: taiki-e/setup-cross-toolchain-action@v1
|
||||||
# run: |
|
with:
|
||||||
# python -m pip install --upgrade pip
|
# NB: sets CARGO_BUILD_TARGET evar - do not need --target flag in build
|
||||||
# pip install commitizen
|
target: ${{ matrix.job.target }}
|
||||||
# npm install -g conventional-changelog-cli
|
|
||||||
|
|
||||||
# - name: Configure Git user
|
- uses: taiki-e/install-action@cross
|
||||||
# run: |
|
if: ${{ matrix.job.use-cross }}
|
||||||
# git config user.name "github-actions[bot]"
|
|
||||||
# git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
|
|
||||||
# - name: Bump version with Commitizen
|
- name: Installing needed Ubuntu dependencies
|
||||||
# run: |
|
if: matrix.job.os == 'ubuntu-latest'
|
||||||
# cz bump --yes --increment ${{ github.event.inputs.bump_type }}
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get -y update
|
||||||
|
case ${{ matrix.job.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: Amend commit message to include '[skip ci]'
|
- name: Build
|
||||||
# run: |
|
run: cargo build --release --verbose --target=${{ matrix.job.target }} --locked
|
||||||
# git commit --amend --no-edit -m "$(git log -1 --pretty=%B) [skip ci]"
|
|
||||||
|
|
||||||
# - name: Install Rust stable
|
- name: Verify file
|
||||||
# uses: dtolnay/rust-toolchain@stable
|
shell: bash
|
||||||
|
run: |
|
||||||
|
file target/${{ matrix.job.target }}/release/managarr
|
||||||
|
|
||||||
# - name: Update the Cargo.lock
|
- name: Test
|
||||||
# run: |
|
if: matrix.job.target != 'aarch64-apple-darwin' && matrix.job.target != 'aarch64-pc-windows-msvc'
|
||||||
# cargo update
|
run: cargo test --release --verbose --target=${{ matrix.job.target }} ${{ matrix.job.test-bin }}
|
||||||
# git add Cargo.lock
|
|
||||||
# git commit -m "chore: Bump the version in Cargo.lock"
|
|
||||||
|
|
||||||
# - name: Get the new version tag
|
- name: Packaging final binary (Windows)
|
||||||
# id: version
|
if: matrix.job.os == 'windows-latest'
|
||||||
# run: |
|
shell: bash
|
||||||
# NEW_TAG=$(cz version --project)
|
run: |
|
||||||
# echo "New version: $NEW_TAG"
|
cd target/${{ matrix.job.target }}/release
|
||||||
# echo "version=$NEW_TAG" >> $GITHUB_ENV
|
BINARY_NAME=managarr.exe
|
||||||
# echo "$NEW_TAG" > artifacts/release-version
|
if [ "${{ matrix.job.target }}" != "aarch64-pc-windows-msvc" ]; then
|
||||||
|
# strip the binary
|
||||||
|
strip $BINARY_NAME
|
||||||
|
fi
|
||||||
|
RELEASE_NAME=managarr-${{ 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: Get the previous version tag
|
- name: Packaging final binary (macOS and Linux)
|
||||||
# id: prev_version
|
if: matrix.job.os != 'windows-latest'
|
||||||
# run: |
|
shell: bash
|
||||||
# PREV_TAG=$(git describe --tags --abbrev=0 ${GITHUB_SHA}^)
|
run: |
|
||||||
# echo "Previous tag: $PREV_TAG"
|
# set the right strip executable
|
||||||
# echo "prev_version=$PREV_TAG" >> $GITHUB_ENV
|
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=managarr
|
||||||
|
# strip the binary
|
||||||
|
"$STRIP" "$BINARY_NAME"
|
||||||
|
RELEASE_NAME=managarr-${{ 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: Generate changelog for the version bump
|
- name: Add artifacts
|
||||||
# id: changelog
|
run: |
|
||||||
# run: |
|
mkdir -p artifacts
|
||||||
# changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s --from ${{ env.prev_version }} --to ${{ env.version }})
|
cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.tar.gz artifacts/
|
||||||
# echo "$changelog" > artifacts/changelog.md
|
cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.sha256 artifacts/
|
||||||
# echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# - name: Push changes
|
- name: Upload artifacts
|
||||||
# env:
|
uses: actions/upload-artifact@v3
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
# run: |
|
name: artifacts
|
||||||
# git push origin --follow-tags
|
path: artifacts
|
||||||
|
|
||||||
# - name: Upload artifacts
|
publish-github-release:
|
||||||
# uses: actions/upload-artifact@v3
|
name: publish-github-release
|
||||||
# with:
|
needs: [bump-version]
|
||||||
# name: artifacts
|
runs-on: ubuntu-latest
|
||||||
# path: artifacts
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
# publish-github-release:
|
- name: Download all artifacts
|
||||||
# name: publish-github-release
|
uses: actions/download-artifact@v3
|
||||||
# needs: [bump-version]
|
with:
|
||||||
# runs-on: ubuntu-latest
|
name: artifacts
|
||||||
# steps:
|
path: artifacts
|
||||||
# - name: Checkout repository
|
|
||||||
# uses: actions/checkout@v3
|
|
||||||
# with:
|
|
||||||
# fetch-depth: 0
|
|
||||||
|
|
||||||
# - name: Download all artifacts
|
- name: Ensure repository is up-to-date
|
||||||
# uses: actions/download-artifact@v3
|
run: |
|
||||||
# with:
|
git fetch --all
|
||||||
# name: artifacts
|
git pull
|
||||||
# path: artifacts
|
|
||||||
|
|
||||||
# - name: Ensure repository is up-to-date
|
- name: Set environment variables
|
||||||
# run: |
|
run: |
|
||||||
# git fetch --all
|
release_version="$(cat ./artifacts/release-version)"
|
||||||
# git pull
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
changelog_body="$(cat ./artifacts/changelog.md)"
|
||||||
|
echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
|
||||||
|
|
||||||
# - name: Set environment variables
|
- name: Create a GitHub Release
|
||||||
# run: |
|
uses: softprops/action-gh-release@v1
|
||||||
# release_version="$(cat ./artifacts/release-version)"
|
env:
|
||||||
# echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# changelog_body="$(cat ./artifacts/changelog.md)"
|
with:
|
||||||
# echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
|
files: |
|
||||||
|
artifacts/managarr-macos-arm64.tar.gz
|
||||||
|
artifacts/managarr-macos-arm64.sha256
|
||||||
|
artifacts/managarr-macos.tar.gz
|
||||||
|
artifacts/managarr-macos.sha256
|
||||||
|
artifacts/managarr-windows.tar.gz
|
||||||
|
artifacts/managarr-windows.sha256
|
||||||
|
artifacts/managarr-windows-aarch64.tar.gz
|
||||||
|
artifacts/managarr-windows-aarch64.sha256
|
||||||
|
artifacts/managarr-linux.tar.gz
|
||||||
|
artifacts/managarr-linux.sha256
|
||||||
|
artifacts/managarr-linux-musl.tar.gz
|
||||||
|
artifacts/managarr-linux-musl.sha256
|
||||||
|
artifacts/managarr-aarch64-gnu.tar.gz
|
||||||
|
artifacts/managarr-aarch64-gnu.sha256
|
||||||
|
artifacts/managarr-aarch64-musl.tar.gz
|
||||||
|
artifacts/managarr-aarch64-musl.sha256
|
||||||
|
artifacts/managarr-armv6-gnu.tar.gz
|
||||||
|
artifacts/managarr-armv6-gnu.sha256
|
||||||
|
artifacts/managarr-armv6-musl.tar.gz
|
||||||
|
artifacts/managarr-armv6-musl.sha256
|
||||||
|
artifacts/managarr-armv7-gnu.tar.gz
|
||||||
|
artifacts/managarr-armv7-gnu.sha256
|
||||||
|
artifacts/managarr-armv7-musl.tar.gz
|
||||||
|
artifacts/managarr-armv7-musl.sha256
|
||||||
|
tag_name: v${{ env.RELEASE_VERSION }}
|
||||||
|
name: "v${{ env.RELEASE_VERSION }}"
|
||||||
|
body: ${{ env.changelog_body }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
# - name: Create a GitHub Release
|
- name: Upload artifacts
|
||||||
# uses: softprops/action-gh-release@v1
|
uses: actions/upload-artifact@v3
|
||||||
# env:
|
with:
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
name: artifacts
|
||||||
# with:
|
path: artifacts
|
||||||
# files: |
|
|
||||||
# artifacts/managarr-macos-arm64.tar.gz
|
|
||||||
# artifacts/managarr-macos-arm64.sha256
|
|
||||||
# artifacts/managarr-macos.tar.gz
|
|
||||||
# artifacts/managarr-macos.sha256
|
|
||||||
# artifacts/managarr-windows.tar.gz
|
|
||||||
# artifacts/managarr-windows.sha256
|
|
||||||
# artifacts/managarr-windows-aarch64.tar.gz
|
|
||||||
# artifacts/managarr-windows-aarch64.sha256
|
|
||||||
# artifacts/managarr-linux.tar.gz
|
|
||||||
# artifacts/managarr-linux.sha256
|
|
||||||
# artifacts/managarr-linux-musl.tar.gz
|
|
||||||
# artifacts/managarr-linux-musl.sha256
|
|
||||||
# artifacts/managarr-aarch64-gnu.tar.gz
|
|
||||||
# artifacts/managarr-aarch64-gnu.sha256
|
|
||||||
# artifacts/managarr-aarch64-musl.tar.gz
|
|
||||||
# artifacts/managarr-aarch64-musl.sha256
|
|
||||||
# artifacts/managarr-armv6-gnu.tar.gz
|
|
||||||
# artifacts/managarr-armv6-gnu.sha256
|
|
||||||
# artifacts/managarr-armv6-musl.tar.gz
|
|
||||||
# artifacts/managarr-armv6-musl.sha256
|
|
||||||
# artifacts/managarr-armv7-gnu.tar.gz
|
|
||||||
# artifacts/managarr-armv7-gnu.sha256
|
|
||||||
# artifacts/managarr-armv7-musl.tar.gz
|
|
||||||
# artifacts/managarr-armv7-musl.sha256
|
|
||||||
# tag_name: v${{ env.RELEASE_VERSION }}
|
|
||||||
# name: "v${{ env.RELEASE_VERSION }}"
|
|
||||||
# body: ${{ env.changelog_body }}
|
|
||||||
# draft: false
|
|
||||||
# prerelease: false
|
|
||||||
|
|
||||||
# - name: Upload artifacts
|
|
||||||
# uses: actions/upload-artifact@v3
|
|
||||||
# with:
|
|
||||||
# name: artifacts
|
|
||||||
# path: artifacts
|
|
||||||
|
|
||||||
# publish-chocolatey-package:
|
# publish-chocolatey-package:
|
||||||
# needs: [publish-github-release]
|
# needs: [publish-github-release]
|
||||||
@@ -414,51 +409,51 @@ jobs:
|
|||||||
# git diff-index --quiet HEAD || git commit -am "Update formula for Managarr release ${{ env.RELEASE_VERSION }}"
|
# git diff-index --quiet HEAD || git commit -am "Update formula for Managarr release ${{ env.RELEASE_VERSION }}"
|
||||||
# git push https://$TOKEN@github.com/Dark-Alex-17/homebrew-managarr.git
|
# git push https://$TOKEN@github.com/Dark-Alex-17/homebrew-managarr.git
|
||||||
|
|
||||||
publish-docker-image:
|
# publish-docker-image:
|
||||||
# needs: [publish-github-release]
|
# needs: [publish-github-release]
|
||||||
name: Publishing Docker image to Docker Hub
|
# name: Publishing Docker image to Docker Hub
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout repository
|
# - name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
with:
|
# with:
|
||||||
fetch-depth: 1
|
# fetch-depth: 1
|
||||||
|
|
||||||
# - name: Get release artifacts
|
# - name: Get release artifacts
|
||||||
# uses: actions/download-artifact@v3
|
# uses: actions/download-artifact@v3
|
||||||
# with:
|
# with:
|
||||||
# name: artifacts
|
# name: artifacts
|
||||||
# path: artifacts
|
# path: artifacts
|
||||||
- name: Set version variable
|
|
||||||
run: |
|
# - name: Set version variable
|
||||||
echo "version=0.4.2" >> $GITHUB_ENV
|
# run: |
|
||||||
# version="$(cat artifacts/release-version)"
|
# version="$(cat artifacts/release-version)"
|
||||||
# echo "version=$version" >> $GITHUB_ENV
|
# echo "version=$version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Validate release environment variables
|
# - name: Validate release environment variables
|
||||||
run: |
|
# run: |
|
||||||
echo "Release version: ${{ env.version }}"
|
# echo "Release version: ${{ env.version }}"
|
||||||
|
|
||||||
- name: Set up QEMU
|
# - name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
# uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
# - name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
# uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
# - name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
# uses: docker/login-action@v3
|
||||||
with:
|
# with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Push to Docker Hub
|
# - name: Push to Docker Hub
|
||||||
uses: docker/build-push-action@v5
|
# uses: docker/build-push-action@v5
|
||||||
with:
|
# with:
|
||||||
context: .
|
# context: .
|
||||||
file: Dockerfile
|
# file: Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
# platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
# push: true
|
||||||
tags: darkalex17/managarr:latest, darkalex17/managarr:${{ env.version }}
|
# tags: darkalex17/managarr:latest, darkalex17/managarr:${{ env.version }}
|
||||||
|
|
||||||
# publish-crate:
|
# publish-crate:
|
||||||
# needs: publish-github-release
|
# needs: publish-github-release
|
||||||
|
|||||||
Reference in New Issue
Block a user