ci: Configure release workflow to only release docker now [skip ci]
This commit is contained in:
+295
-296
@@ -18,298 +18,298 @@ on:
|
|||||||
- major
|
- major
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-release-artifacts:
|
# build-release-artifacts:
|
||||||
name: build-release
|
# name: build-release
|
||||||
runs-on: ${{ matrix.job.os }}
|
# runs-on: ${{ matrix.job.os }}
|
||||||
env:
|
# env:
|
||||||
RUST_BACKTRACE: 1
|
# RUST_BACKTRACE: 1
|
||||||
strategy:
|
# strategy:
|
||||||
fail-fast: true
|
# fail-fast: true
|
||||||
matrix:
|
# matrix:
|
||||||
# prettier-ignore
|
# # prettier-ignore
|
||||||
job:
|
# job:
|
||||||
- { name: "macOS-arm64", os: "macOS-latest", target: "aarch64-apple-darwin", artifact_suffix: "macos-arm64", use-cross: true }
|
# - { 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: "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-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: "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-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-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-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-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-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-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-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" }
|
# - { 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]
|
# rust: [stable]
|
||||||
|
|
||||||
steps:
|
# steps:
|
||||||
- name: Check if actor is repository owner
|
# - name: Check if actor is repository owner
|
||||||
if: ${{ github.actor != github.repository_owner }}
|
# if: ${{ github.actor != github.repository_owner }}
|
||||||
run: |
|
# run: |
|
||||||
echo "You are not authorized to run this workflow."
|
# echo "You are not authorized to run this workflow."
|
||||||
exit 1
|
# exit 1
|
||||||
|
|
||||||
- name: Checkout repository
|
# - name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
with:
|
# with:
|
||||||
fetch-depth: 1
|
# fetch-depth: 1
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
# - uses: actions/cache@v3
|
||||||
name: Cache Cargo registry
|
# name: Cache Cargo registry
|
||||||
with:
|
# with:
|
||||||
path: ~/.cargo/registry
|
# path: ~/.cargo/registry
|
||||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
|
# key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
# - uses: actions/cache@v3
|
||||||
if: startsWith(matrix.job.name, 'linux-')
|
# if: startsWith(matrix.job.name, 'linux-')
|
||||||
with:
|
# with:
|
||||||
path: ~/.cargo/bin
|
# path: ~/.cargo/bin
|
||||||
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }}
|
# key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }}
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
# - uses: dtolnay/rust-toolchain@stable
|
||||||
name: Set Rust toolchain
|
# name: Set Rust toolchain
|
||||||
with:
|
# with:
|
||||||
targets: ${{ matrix.job.target }}
|
# targets: ${{ matrix.job.target }}
|
||||||
|
|
||||||
- uses: taiki-e/setup-cross-toolchain-action@v1
|
# - uses: taiki-e/setup-cross-toolchain-action@v1
|
||||||
with:
|
# with:
|
||||||
# NB: sets CARGO_BUILD_TARGET evar - do not need --target flag in build
|
# # NB: sets CARGO_BUILD_TARGET evar - do not need --target flag in build
|
||||||
target: ${{ matrix.job.target }}
|
# target: ${{ matrix.job.target }}
|
||||||
|
|
||||||
- uses: taiki-e/install-action@cross
|
# - uses: taiki-e/install-action@cross
|
||||||
if: ${{ matrix.job.use-cross }}
|
# if: ${{ matrix.job.use-cross }}
|
||||||
|
|
||||||
- name: Installing needed Ubuntu dependencies
|
# - name: Installing needed Ubuntu dependencies
|
||||||
if: matrix.job.os == 'ubuntu-latest'
|
# if: matrix.job.os == 'ubuntu-latest'
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
sudo apt-get -y update
|
# sudo apt-get -y update
|
||||||
case ${{ matrix.job.target }} in
|
# case ${{ matrix.job.target }} in
|
||||||
arm*-linux-*) sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
|
# arm*-linux-*) sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
|
||||||
aarch64-*-linux-*) sudo apt-get -y install gcc-aarch64-linux-gnu ;;
|
# aarch64-*-linux-*) sudo apt-get -y install gcc-aarch64-linux-gnu ;;
|
||||||
esac
|
# esac
|
||||||
|
|
||||||
- name: Build
|
# - name: Build
|
||||||
run: cargo build --release --verbose --target=${{ matrix.job.target }} --locked
|
# run: cargo build --release --verbose --target=${{ matrix.job.target }} --locked
|
||||||
|
|
||||||
- name: Verify file
|
# - name: Verify file
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
file target/${{ matrix.job.target }}/release/managarr
|
# file target/${{ matrix.job.target }}/release/managarr
|
||||||
|
|
||||||
- name: Test
|
# - name: Test
|
||||||
if: matrix.job.target != 'aarch64-apple-darwin' && matrix.job.target != 'aarch64-pc-windows-msvc'
|
# 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 }}
|
# run: cargo test --release --verbose --target=${{ matrix.job.target }} ${{ matrix.job.test-bin }}
|
||||||
|
|
||||||
- name: Packaging final binary (Windows)
|
# - name: Packaging final binary (Windows)
|
||||||
if: matrix.job.os == 'windows-latest'
|
# if: matrix.job.os == 'windows-latest'
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
cd target/${{ matrix.job.target }}/release
|
# cd target/${{ matrix.job.target }}/release
|
||||||
BINARY_NAME=managarr.exe
|
# BINARY_NAME=managarr.exe
|
||||||
if [ "${{ matrix.job.target }}" != "aarch64-pc-windows-msvc" ]; then
|
# if [ "${{ matrix.job.target }}" != "aarch64-pc-windows-msvc" ]; then
|
||||||
# strip the binary
|
# # strip the binary
|
||||||
strip $BINARY_NAME
|
# strip $BINARY_NAME
|
||||||
fi
|
# fi
|
||||||
RELEASE_NAME=managarr-${{ matrix.job.artifact_suffix }}
|
# RELEASE_NAME=managarr-${{ matrix.job.artifact_suffix }}
|
||||||
mkdir -p artifacts
|
# mkdir -p artifacts
|
||||||
tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
|
# tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
|
||||||
# create sha checksum files
|
# # create sha checksum files
|
||||||
certutil -hashfile $RELEASE_NAME.tar.gz sha256 | grep -E [A-Fa-f0-9]{64} > $RELEASE_NAME.sha256
|
# certutil -hashfile $RELEASE_NAME.tar.gz sha256 | grep -E [A-Fa-f0-9]{64} > $RELEASE_NAME.sha256
|
||||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
# echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Packaging final binary (macOS and Linux)
|
# - name: Packaging final binary (macOS and Linux)
|
||||||
if: matrix.job.os != 'windows-latest'
|
# if: matrix.job.os != 'windows-latest'
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
# set the right strip executable
|
# # set the right strip executable
|
||||||
STRIP="strip";
|
# STRIP="strip";
|
||||||
case ${{ matrix.job.target }} in
|
# case ${{ matrix.job.target }} in
|
||||||
arm*-linux-*) STRIP="arm-linux-gnueabihf-strip" ;;
|
# arm*-linux-*) STRIP="arm-linux-gnueabihf-strip" ;;
|
||||||
aarch64-*-linux-*) STRIP="aarch64-linux-gnu-strip" ;;
|
# aarch64-*-linux-*) STRIP="aarch64-linux-gnu-strip" ;;
|
||||||
esac;
|
# esac;
|
||||||
cd target/${{ matrix.job.target }}/release
|
# cd target/${{ matrix.job.target }}/release
|
||||||
BINARY_NAME=managarr
|
# BINARY_NAME=managarr
|
||||||
# strip the binary
|
# # strip the binary
|
||||||
"$STRIP" "$BINARY_NAME"
|
# "$STRIP" "$BINARY_NAME"
|
||||||
RELEASE_NAME=managarr-${{ matrix.job.artifact_suffix }}
|
# RELEASE_NAME=managarr-${{ matrix.job.artifact_suffix }}
|
||||||
tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
|
# tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
|
||||||
# create sha checksum files
|
# # create sha checksum files
|
||||||
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
|
# shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
|
||||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
# echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Add artifacts
|
# - name: Add artifacts
|
||||||
run: |
|
# run: |
|
||||||
mkdir -p artifacts
|
# mkdir -p artifacts
|
||||||
cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.tar.gz artifacts/
|
# cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.tar.gz artifacts/
|
||||||
cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.sha256 artifacts/
|
# cp target/${{ matrix.job.target }}/release/${{ env.RELEASE_NAME }}.sha256 artifacts/
|
||||||
|
|
||||||
- name: Upload artifacts
|
# - name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: artifacts
|
# name: artifacts
|
||||||
path: artifacts
|
# path: artifacts
|
||||||
|
|
||||||
bump-version:
|
# bump-version:
|
||||||
name: bump-version
|
# name: bump-version
|
||||||
needs: [build-release-artifacts]
|
# needs: [build-release-artifacts]
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Configure SSH for Git
|
# - name: Configure SSH for Git
|
||||||
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
|
||||||
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: Download all artifacts
|
# - name: Download all artifacts
|
||||||
uses: actions/download-artifact@v3
|
# uses: actions/download-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: artifacts
|
# name: artifacts
|
||||||
path: artifacts
|
# path: artifacts
|
||||||
|
|
||||||
- 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: Update the Cargo.lock
|
# - name: Update the Cargo.lock
|
||||||
run: |
|
# run: |
|
||||||
cargo update
|
# cargo update
|
||||||
git add Cargo.lock
|
# git add Cargo.lock
|
||||||
git commit -m "chore: Bump the version in Cargo.lock"
|
# git commit -m "chore: Bump the version in Cargo.lock"
|
||||||
|
|
||||||
- name: Get the new version tag
|
# - name: Get the new version tag
|
||||||
id: version
|
# id: version
|
||||||
run: |
|
# run: |
|
||||||
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: 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
|
||||||
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@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: artifacts
|
# name: artifacts
|
||||||
path: artifacts
|
# path: artifacts
|
||||||
|
|
||||||
publish-github-release:
|
# publish-github-release:
|
||||||
name: publish-github-release
|
# name: publish-github-release
|
||||||
needs: [bump-version]
|
# needs: [bump-version]
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout repository
|
# - name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
with:
|
# with:
|
||||||
fetch-depth: 0
|
# fetch-depth: 0
|
||||||
|
|
||||||
- name: Download all artifacts
|
# - name: Download all artifacts
|
||||||
uses: actions/download-artifact@v3
|
# uses: actions/download-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: artifacts
|
# name: artifacts
|
||||||
path: artifacts
|
# path: artifacts
|
||||||
|
|
||||||
- name: Ensure repository is up-to-date
|
# - name: Ensure repository is up-to-date
|
||||||
run: |
|
# run: |
|
||||||
git fetch --all
|
# git fetch --all
|
||||||
git pull
|
# git pull
|
||||||
|
|
||||||
- name: Set environment variables
|
# - name: Set environment variables
|
||||||
run: |
|
# run: |
|
||||||
release_version="$(cat ./artifacts/release-version)"
|
# release_version="$(cat ./artifacts/release-version)"
|
||||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
# echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
changelog_body="$(cat ./artifacts/changelog.md)"
|
# changelog_body="$(cat ./artifacts/changelog.md)"
|
||||||
echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
|
# echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create a GitHub Release
|
# - name: Create a GitHub Release
|
||||||
uses: softprops/action-gh-release@v1
|
# uses: softprops/action-gh-release@v1
|
||||||
env:
|
# env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
# with:
|
||||||
files: |
|
# files: |
|
||||||
artifacts/managarr-macos-arm64.tar.gz
|
# artifacts/managarr-macos-arm64.tar.gz
|
||||||
artifacts/managarr-macos-arm64.sha256
|
# artifacts/managarr-macos-arm64.sha256
|
||||||
artifacts/managarr-macos.tar.gz
|
# artifacts/managarr-macos.tar.gz
|
||||||
artifacts/managarr-macos.sha256
|
# artifacts/managarr-macos.sha256
|
||||||
artifacts/managarr-windows.tar.gz
|
# artifacts/managarr-windows.tar.gz
|
||||||
artifacts/managarr-windows.sha256
|
# artifacts/managarr-windows.sha256
|
||||||
artifacts/managarr-windows-aarch64.tar.gz
|
# artifacts/managarr-windows-aarch64.tar.gz
|
||||||
artifacts/managarr-windows-aarch64.sha256
|
# artifacts/managarr-windows-aarch64.sha256
|
||||||
artifacts/managarr-linux.tar.gz
|
# artifacts/managarr-linux.tar.gz
|
||||||
artifacts/managarr-linux.sha256
|
# artifacts/managarr-linux.sha256
|
||||||
artifacts/managarr-linux-musl.tar.gz
|
# artifacts/managarr-linux-musl.tar.gz
|
||||||
artifacts/managarr-linux-musl.sha256
|
# artifacts/managarr-linux-musl.sha256
|
||||||
artifacts/managarr-aarch64-gnu.tar.gz
|
# artifacts/managarr-aarch64-gnu.tar.gz
|
||||||
artifacts/managarr-aarch64-gnu.sha256
|
# artifacts/managarr-aarch64-gnu.sha256
|
||||||
artifacts/managarr-aarch64-musl.tar.gz
|
# artifacts/managarr-aarch64-musl.tar.gz
|
||||||
artifacts/managarr-aarch64-musl.sha256
|
# artifacts/managarr-aarch64-musl.sha256
|
||||||
artifacts/managarr-armv6-gnu.tar.gz
|
# artifacts/managarr-armv6-gnu.tar.gz
|
||||||
artifacts/managarr-armv6-gnu.sha256
|
# artifacts/managarr-armv6-gnu.sha256
|
||||||
artifacts/managarr-armv6-musl.tar.gz
|
# artifacts/managarr-armv6-musl.tar.gz
|
||||||
artifacts/managarr-armv6-musl.sha256
|
# artifacts/managarr-armv6-musl.sha256
|
||||||
artifacts/managarr-armv7-gnu.tar.gz
|
# artifacts/managarr-armv7-gnu.tar.gz
|
||||||
artifacts/managarr-armv7-gnu.sha256
|
# artifacts/managarr-armv7-gnu.sha256
|
||||||
artifacts/managarr-armv7-musl.tar.gz
|
# artifacts/managarr-armv7-musl.tar.gz
|
||||||
artifacts/managarr-armv7-musl.sha256
|
# artifacts/managarr-armv7-musl.sha256
|
||||||
tag_name: v${{ env.RELEASE_VERSION }}
|
# tag_name: v${{ env.RELEASE_VERSION }}
|
||||||
name: "v${{ env.RELEASE_VERSION }}"
|
# name: "v${{ env.RELEASE_VERSION }}"
|
||||||
body: ${{ env.changelog_body }}
|
# body: ${{ env.changelog_body }}
|
||||||
draft: false
|
# draft: false
|
||||||
prerelease: false
|
# prerelease: false
|
||||||
|
|
||||||
- name: Upload artifacts
|
# - name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: artifacts
|
# name: artifacts
|
||||||
path: artifacts
|
# path: artifacts
|
||||||
|
|
||||||
# publish-chocolatey-package:
|
# publish-chocolatey-package:
|
||||||
# needs: [publish-github-release]
|
# needs: [publish-github-release]
|
||||||
@@ -414,52 +414,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: |
|
||||||
|
echo "version=0.4.2" >> $GITHUB_ENV
|
||||||
|
# version="$(cat artifacts/release-version)"
|
||||||
|
# echo "version=$version" >> $GITHUB_ENV
|
||||||
|
|
||||||
# - name: Set version variable
|
- name: Validate release environment variables
|
||||||
# run: |
|
run: |
|
||||||
# # version="$(cat artifacts/release-version)"
|
echo "Release version: ${{ env.version }}"
|
||||||
# # echo "version=$version" >> $GITHUB_ENV
|
|
||||||
# echo "version=0.4.2" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# - name: Validate release environment variables
|
- name: Set up QEMU
|
||||||
# run: |
|
uses: docker/setup-qemu-action@v3
|
||||||
# echo "Release version: ${{ env.version }}"
|
|
||||||
|
|
||||||
# - name: Set up QEMU
|
- name: Set up Docker Buildx
|
||||||
# uses: docker/setup-qemu-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# - name: Set up Docker Buildx
|
- name: Login to Docker Hub
|
||||||
# uses: docker/setup-buildx-action@v3
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
# - name: Login to Docker Hub
|
- name: Push to Docker Hub
|
||||||
# uses: docker/login-action@v3
|
uses: docker/build-push-action@v5
|
||||||
# with:
|
with:
|
||||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
context: .
|
||||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
file: Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
# - name: Push to Docker Hub
|
push: true
|
||||||
# uses: docker/build-push-action@v5
|
tags: darkalex17/managarr:latest, darkalex17/managarr:${{ env.version }}
|
||||||
# with:
|
|
||||||
# context: .
|
|
||||||
# file: Dockerfile
|
|
||||||
# platforms: linux/amd64,linux/arm64
|
|
||||||
# push: true
|
|
||||||
# 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