Skip to content

test2

test2 #6

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+test"
permissions:
contents: write
jobs:
# build-and-upload-binary:
# name: Build and upload
# runs-on: ${{ matrix.os }}
#
# strategy:
# matrix:
# include:
# - build: linux
# os: ubuntu-latest
# target: x86_64-unknown-linux-musl
#
# - build: macos
# os: macos-latest
# target: x86_64-apple-darwin
#
# - build: macos
# os: macos-14
# target: aarch64-apple-darwin
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Get the release version from the tag
# shell: bash
# run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
#
# - name: Install Rust
# uses: dtolnay/rust-toolchain@stable
# with:
# targets: ${{ matrix.target }}
#
# - name: Build
# uses: actions-rs/cargo@v1
# with:
# use-cross: true
# command: build
# args: --verbose --release --target ${{ matrix.target }}
#
# - name: Build archive
# shell: bash
# run: |
# binary_name="telegram2photoprism"
#
# dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
# mkdir "$dirname"
#
# mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
# tar -C "$dirname" -czf "$dirname.tar.gz" .
# echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
#
# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# files: |
# ${{ env.ASSET }}
build-and-upload-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: dssysolyatin/telegram2photoprism:${{ env.VERSION }}