Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:

name: CI

permissions:
contents: read

jobs:
check:
name: Check and Clippy
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Deploy Docs to GitHub Pages

on:
push:
branches: [main]
paths:
- 'docs/**'
# push:
# branches: [main]
# paths:
# - 'docs/**'
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
description: "Branch to release from"
required: false
default: "next"
push:
branches:
- next
# push:
# branches:
# - next

concurrency:
group: release-next
Expand Down Expand Up @@ -64,16 +64,16 @@ jobs:
strategy:
matrix:
include:
- build: linux
os: depot-ubuntu-22.04-8
target: x86_64-unknown-linux-gnu
- build: aarch64
os: depot-ubuntu-22.04-arm-8
target: aarch64-unknown-linux-gnu
linker: gcc-aarch64-linux-gnu
- build: macos
os: depot-macos-14
target: x86_64-apple-darwin
# - build: linux
# os: depot-ubuntu-22.04-8
# target: x86_64-unknown-linux-gnu
# - build: aarch64
# os: depot-ubuntu-22.04-arm-8
# target: aarch64-unknown-linux-gnu
# linker: gcc-aarch64-linux-gnu
# - build: macos
# os: depot-macos-14
# target: x86_64-apple-darwin
- build: macos-aarch64
os: depot-macos-14
target: aarch64-apple-darwin
Expand Down
105 changes: 53 additions & 52 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Create Release

on:
push:
branches:
- main
paths:
- "Cargo.toml"
# push:
# branches:
# - main
# paths:
# - "Cargo.toml"
workflow_dispatch:

jobs:
check_version:
Expand Down Expand Up @@ -168,50 +169,50 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

update_homebrew_formula:
needs: [build, check_version]
runs-on: ubuntu-latest
if: ${{ needs.check_version.outputs.version_changed == 'true' }}
steps:
- name: Checkout Homebrew Tap Repository
run: git clone https://github.com/mentimeter/homebrew-mentimeter.git

- name: Update Homebrew Formula
run: |
RELEASE_VERSION="${{ needs.build.outputs.release_version }}"
FORMULA_PATH="homebrew-mentimeter/linkup.rb"

if [ -z "$RELEASE_VERSION" ]; then
printf '%s\n' 'RELEASE_VERSION variable is empty'
exit 1
fi

MAC_ARM_SHA=$(echo "${{ needs.build.outputs.mac_arm_sha }}" | awk '{print $1}')
MAC_X86_SHA=$(echo "${{ needs.build.outputs.mac_x86_sha }}" | awk '{print $1}')
LINUX_ARM_SHA=$(echo "${{ needs.build.outputs.linux_arm_sha }}" | awk '{print $1}')
LINUX_X86_SHA=$(echo "${{ needs.build.outputs.linux_x86_sha }}" | awk '{print $1}')

# Update the SHA values
sed -i "s|MAC_ARM_SHA = \".*\"|MAC_ARM_SHA = \"$MAC_ARM_SHA\"|" "$FORMULA_PATH"
sed -i "s|MAC_X86_SHA = \".*\"|MAC_X86_SHA = \"$MAC_X86_SHA\"|" "$FORMULA_PATH"
sed -i "s|LINUX_ARM_SHA = \".*\"|LINUX_ARM_SHA = \"$LINUX_ARM_SHA\"|" "$FORMULA_PATH"
sed -i "s|LINUX_X86_SHA = \".*\"|LINUX_X86_SHA = \"$LINUX_X86_SHA\"|" "$FORMULA_PATH"

# Update the URLs with the new release version
sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*aarch64-apple-darwin.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-aarch64-apple-darwin.tar.gz|" "$FORMULA_PATH"
sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*x86_64-apple-darwin.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-x86_64-apple-darwin.tar.gz|" "$FORMULA_PATH"
sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*aarch64-unknown-linux-gnu.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-aarch64-unknown-linux-gnu.tar.gz|" "$FORMULA_PATH"
sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*x86_64-unknown-linux-gnu.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-x86_64-unknown-linux-gnu.tar.gz|" "$FORMULA_PATH"

cd homebrew-mentimeter

git remote set-url origin https://x-access-token:${COMMIT_TOKEN}@github.com/mentimeter/homebrew-mentimeter.git
git config --global user.name "mentibot"
git config --global user.email "122382604+mentibot@users.noreply.github.com"

git add linkup.rb
git commit -m "Update Linkup formula to $RELEASE_VERSION"

git push origin HEAD:main
env:
COMMIT_TOKEN: ${{ secrets.COMMIT_TOKEN }}
# update_homebrew_formula:
# needs: [build, check_version]
# runs-on: ubuntu-latest
# if: ${{ needs.check_version.outputs.version_changed == 'true' }}
# steps:
# - name: Checkout Homebrew Tap Repository
# run: git clone https://github.com/mentimeter/homebrew-mentimeter.git

# - name: Update Homebrew Formula
# run: |
# RELEASE_VERSION="${{ needs.build.outputs.release_version }}"
# FORMULA_PATH="homebrew-mentimeter/linkup.rb"

# if [ -z "$RELEASE_VERSION" ]; then
# printf '%s\n' 'RELEASE_VERSION variable is empty'
# exit 1
# fi

# MAC_ARM_SHA=$(echo "${{ needs.build.outputs.mac_arm_sha }}" | awk '{print $1}')
# MAC_X86_SHA=$(echo "${{ needs.build.outputs.mac_x86_sha }}" | awk '{print $1}')
# LINUX_ARM_SHA=$(echo "${{ needs.build.outputs.linux_arm_sha }}" | awk '{print $1}')
# LINUX_X86_SHA=$(echo "${{ needs.build.outputs.linux_x86_sha }}" | awk '{print $1}')

# # Update the SHA values
# sed -i "s|MAC_ARM_SHA = \".*\"|MAC_ARM_SHA = \"$MAC_ARM_SHA\"|" "$FORMULA_PATH"
# sed -i "s|MAC_X86_SHA = \".*\"|MAC_X86_SHA = \"$MAC_X86_SHA\"|" "$FORMULA_PATH"
# sed -i "s|LINUX_ARM_SHA = \".*\"|LINUX_ARM_SHA = \"$LINUX_ARM_SHA\"|" "$FORMULA_PATH"
# sed -i "s|LINUX_X86_SHA = \".*\"|LINUX_X86_SHA = \"$LINUX_X86_SHA\"|" "$FORMULA_PATH"

# # Update the URLs with the new release version
# sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*aarch64-apple-darwin.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-aarch64-apple-darwin.tar.gz|" "$FORMULA_PATH"
# sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*x86_64-apple-darwin.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-x86_64-apple-darwin.tar.gz|" "$FORMULA_PATH"
# sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*aarch64-unknown-linux-gnu.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-aarch64-unknown-linux-gnu.tar.gz|" "$FORMULA_PATH"
# sed -i "s|https://github.com/mentimeter/linkup/releases/download/[^/]*/linkup-[^/]*x86_64-unknown-linux-gnu.tar.gz|https://github.com/mentimeter/linkup/releases/download/$RELEASE_VERSION/linkup-x86_64-unknown-linux-gnu.tar.gz|" "$FORMULA_PATH"

# cd homebrew-mentimeter

# git remote set-url origin https://x-access-token:${COMMIT_TOKEN}@github.com/mentimeter/homebrew-mentimeter.git
# git config --global user.name "mentibot"
# git config --global user.email "122382604+mentibot@users.noreply.github.com"

# git add linkup.rb
# git commit -m "Update Linkup formula to $RELEASE_VERSION"

# git push origin HEAD:main
# env:
# COMMIT_TOKEN: ${{ secrets.COMMIT_TOKEN }}
Loading