enhancement: added images, audio, video metadata to output logging wh… #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflow/release-by-label.yml | |
# automatically perform release when a version tag is pushed via git | |
name: "tagged-release" | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
inputs: | |
tag_name: | |
description: 'Tag name for release' | |
required: false | |
default: nightly | |
# push: | |
# branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CARGO_TERM_COLOR: always | |
jobs: | |
tagname: | |
runs-on: ubuntu-latest | |
outputs: | |
tag_name: ${{ steps.tag.outputs.tag }} | |
steps: | |
- if: github.event_name == 'workflow_dispatch' | |
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV | |
- if: github.event_name == 'push' | |
run: | | |
TAG_NAME=${{ github.ref }} | |
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV | |
- id: vars | |
shell: bash | |
run: echo "sha_short=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
- if: env.TAG_NAME == 'nightly' | |
run: echo 'TAG_NAME=nightly-${{ steps.vars.outputs.sha_short }}' >> $GITHUB_ENV | |
- id: tag | |
run: echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT | |
tagged-release: | |
name: "Tagged Release" | |
runs-on: "ubuntu-latest" | |
needs: tagname | |
container: ubuntu:18.04 | |
env: | |
RELEASE_TAG_NAME: ${{ needs.tagname.outputs.tag_name }} | |
DEBIAN_FRONTEND: noninteractive | |
steps: | |
- uses: actions/checkout@v4 | |
- if: github.event_name == 'workflow_dispatch' | |
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV | |
- if: github.event_name == 'schedule' | |
run: echo 'TAG_NAME=nightly' >> $GITHUB_ENV | |
- if: github.event_name == 'push' | |
run: | | |
TAG_NAME=${{ github.ref }} | |
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
apt-get -y update | |
apt-get -y install cmake pkg-config libfontconfig-dev libgtk-3-dev libssl-dev libolm-dev rename | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-gnu | |
profile: minimal | |
- name: Build | |
run: cargo build --profile release --bin matrix-commander-rs | |
- name: Gzip | |
run: | | |
mkdir matrix-commander-rs | |
cp ./target/release/matrix-commander-rs matrix-commander-rs/ | |
cp README.md matrix-commander-rs/ | |
cp LICENSE matrix-commander-rs/ | |
cp help.help.txt matrix-commander-rs/ | |
cp help.manual.txt matrix-commander-rs/ | |
cp help.usage.txt matrix-commander-rs/ | |
tar -zcvf ./matrix-commander-rs_${TAG_NAME}_linux.tar.gz matrix-commander-rs | |
# tar -zcvf ./matrix-commander-rs_linux.tar.gz matrix-commander-rs | |
sha256sum ./matrix-commander-rs_${TAG_NAME}_linux.tar.gz > ./matrix-commander-rs_${TAG_NAME}_linux.tar.gz.sha256sum | |
echo "SHA256 checksum is: " | |
cat ./matrix-commander-rs_${TAG_NAME}_linux.tar.gz.sha256sum | |
ls | |
ls -l | |
echo ${TAG_NAME} > tag.txt | |
cat tag.txt | |
- name: Upload artifact Linux | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Binary | |
path: | | |
./matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_linux.tar.gz | |
./matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_linux.tar.gz.sha256sum | |
retention-days: 1 | |
# this overwrites all files in the workspace, so files from before will be lost. | |
# - uses: actions/checkout@master | |
# | |
# This would compile and run test cases, but we have a separate Github action for that | |
# - name: Build | |
# run: cargo build --verbose | |
# - name: Run tests | |
# run: cargo test --verbose | |
- name: Compile | |
id: compile | |
uses: rust-build/rust-build.action@master | |
with: | |
RUSTTARGET: x86_64-pc-windows-gnu | |
UPLOAD_MODE: none | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Binary | |
path: | | |
${{ steps.compile.outputs.BUILT_ARCHIVE }} | |
${{ steps.compile.outputs.BUILT_CHECKSUM }} | |
- name: Compile | |
id: compile2 | |
uses: rust-build/rust-build.action@master | |
with: | |
RUSTTARGET: x86_64-unknown-linux-musl | |
# ARCHIVE_TYPES: tar.gz | |
UPLOAD_MODE: none | |
MINIFY: true | |
EXTRA_FILES: "README.md LICENSE help.help.txt help.manual.txt help.usage.txt" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Binary | |
path: | | |
${{ steps.compile2.outputs.BUILT_ARCHIVE }} | |
${{ steps.compile2.outputs.BUILT_CHECKSUM }} | |
- name: Compile | |
id: compile3 | |
uses: rust-build/rust-build.action@master | |
with: | |
RUSTTARGET: x86_64-apple-darwin | |
# ARCHIVE_TYPES: tar.gz | |
UPLOAD_MODE: none | |
MINIFY: true | |
EXTRA_FILES: "README.md LICENSE help.help.txt help.manual.txt help.usage.txt" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Binary | |
path: | | |
${{ steps.compile3.outputs.BUILT_ARCHIVE }} | |
${{ steps.compile3.outputs.BUILT_CHECKSUM }} | |
- name: Final-check | |
run: | | |
ls -l | |
echo "content of output directory" | |
ls -l output | |
TAG_NAME=$(cat tag.txt) | |
cat tag.txt | |
echo "tag name: $TAG_NAME" | |
echo "release tag: $RELEASE_TAG_NAME" | |
echo "env release tag: " ${{ env.RELEASE_TAG_NAME }} | |
echo "if rename not installed, will stop action if using rename" | |
echo $(which rename) | |
echo $(rename -h) | |
echo $(rename -v) | |
echo $(rename -V) | |
rename 's/_null_/_${{ env.RELEASE_TAG_NAME }}_/' output/* | |
#cd output | |
#ls | |
#mv matrix-commander-rs_null_x86_64-pc-windows-gnu.zip matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-pc-windows-gnu.zip | |
#mv matrix-commander-rs_null_x86_64-pc-windows-gnu.zip.sha256sum matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-pc-windows-gnu.zip.sha256sum | |
#mv matrix-commander-rs_null_x86_64-unknown-linux-musl.zip matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-unknown-linux-musl.zip | |
#mv matrix-commander-rs_null_x86_64-unknown-linux-musl.zip.sha256sum matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-unknown-linux-musl.zip.sha256sum | |
#mv matrix-commander-rs_null_x86_64-apple-darwin.zip matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-apple-darwin.zip | |
#mv matrix-commander-rs_null_x86_64-apple-darwin.zip.sha256sum matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-apple-darwin.zip.sha256sum | |
#cd .. | |
ls * output/* | |
# https://github.com/softprops/action-gh-release | |
# do wildcards like * work in files? | |
- name: Release | |
uses: "softprops/action-gh-release@v1" | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
generate_release_notes: true | |
files: | | |
README.md | |
LICENSE | |
matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_linux.tar.gz.sha256sum | |
matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_linux.tar.gz | |
output/matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-pc-windows-gnu.zip | |
output/matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-pc-windows-gnu.zip.sha256sum | |
output/matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-unknown-linux-musl.zip | |
output/matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-unknown-linux-musl.zip.sha256sum | |
output/matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-apple-darwin.zip | |
output/matrix-commander-rs_${{ env.RELEASE_TAG_NAME }}_x86_64-apple-darwin.zip.sha256sum | |
hel*.txt | |
# ${{ steps.compile.outputs.BUILT_ARCHIVE }} | |
# ${{ steps.compile.outputs.BUILT_CHECKSUM }} | |
# ${{ steps.compile2.outputs.BUILT_ARCHIVE }} | |
# ${{ steps.compile2.outputs.BUILT_CHECKSUM }} | |
# ${{ steps.compile3.outputs.BUILT_ARCHIVE }} | |
# ${{ steps.compile3.outputs.BUILT_CHECKSUM }} |