mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-22 16:04:28 +00:00
Bumps the github-actions group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` | | [actions/setup-java](https://github.com/actions/setup-java) | `5.3.0` | `6.0.0` | | [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `3.0.1` | `3.0.3` | | [actions/cache](https://github.com/actions/cache) | `5.0.5` | `6.1.0` | | [fjogeleit/http-request-action](https://github.com/fjogeleit/http-request-action) | `2.0.0` | `2.0.1` | | [actions/stale](https://github.com/actions/stale) | `10.3.0` | `11.0.0` | | [vedantmgoyal2009/winget-releaser](https://github.com/vedantmgoyal2009/winget-releaser) | `7bd472be23763def6e16bd06cc8b1cdfab0e2fd5` | `b3a5dae0047c6180023acba3f548c55fdf6b7193` | Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `actions/setup-java` from 5.3.0 to 6.0.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/ad2b38190b15e4d6bdf0c97fb4fca8412226d287...dd06d9cba3e5552c54d9f8ea23572deb30010f7c) Updates `softprops/action-gh-release` from 3.0.1 to 3.0.3 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/718ea10b132b3b2eba29c1007bb80653f286566b...efb35369e0ad2afab669f228072c1b0d510eae64) Updates `actions/cache` from 5.0.5 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/27d5ce7f107fe9357f9df03efb73ab90386fccae...55cc8345863c7cc4c66a329aec7e433d2d1c52a9) Updates `fjogeleit/http-request-action` from 2.0.0 to 2.0.1 - [Release notes](https://github.com/fjogeleit/http-request-action/releases) - [Changelog](https://github.com/fjogeleit/http-request-action/blob/main/RELEASE.md) - [Commits](https://github.com/fjogeleit/http-request-action/compare/551353b829c3646756b2ec2b3694f819d7957495...f98bb26551cd1af7d3eb2674578a80754ece88db) Updates `actions/stale` from 10.3.0 to 11.0.0 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899...4391f3da665fdf50b6810c1a66712fb9ba21aa93) Updates `vedantmgoyal2009/winget-releaser` from 7bd472be23763def6e16bd06cc8b1cdfab0e2fd5 to b3a5dae0047c6180023acba3f548c55fdf6b7193 - [Release notes](https://github.com/vedantmgoyal2009/winget-releaser/releases) - [Commits](https://github.com/vedantmgoyal2009/winget-releaser/compare/7bd472be23763def6e16bd06cc8b1cdfab0e2fd5...b3a5dae0047c6180023acba3f548c55fdf6b7193) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-java dependency-version: 5.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/stale dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: fjogeleit/http-request-action dependency-version: 2.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: vedantmgoyal2009/winget-releaser dependency-version: b3a5dae0047c6180023acba3f548c55fdf6b7193 dependency-type: direct:production dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
202 lines
8.2 KiB
YAML
202 lines
8.2 KiB
YAML
name: Build Arch package
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
schedule:
|
|
- cron: '0 21 20 * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version'
|
|
required: false
|
|
create-pr:
|
|
description: 'Create a PR for aur repo'
|
|
type: boolean
|
|
default: false
|
|
push:
|
|
branches-ignore:
|
|
- 'dependabot/**'
|
|
paths:
|
|
- '.github/workflows/linux-makepkg.yml'
|
|
- 'dist/linux/makepkg/**'
|
|
- 'dist/linux/common/**'
|
|
- 'dist/linux/resources/**'
|
|
|
|
jobs:
|
|
get-version:
|
|
uses: ./.github/workflows/get-version.yml
|
|
with:
|
|
version: ${{ inputs.version }}
|
|
|
|
makepkg:
|
|
name: Build with makepkg
|
|
needs: [get-version]
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux:base-devel
|
|
env:
|
|
PKGDEST: ${{ github.workspace }}/pkgdest
|
|
SRCDEST: ${{ github.workspace }}/srcdest
|
|
steps:
|
|
- name: Prepare pacman
|
|
run: |
|
|
pacman-key --init
|
|
pacman-key --populate archlinux
|
|
pacman -Syu --noconfirm --needed git base-devel sudo gnupg maven unzip
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
path: cryptomator
|
|
- name: Create build user
|
|
run: |
|
|
useradd -m builder
|
|
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/builder
|
|
chown -R builder:builder "$GITHUB_WORKSPACE"
|
|
install -d -m 0755 -o builder -g builder "$PKGDEST" "$SRCDEST"
|
|
- name: Prepare PKGBUILD
|
|
# cannot use github.workspace due to https://github.com/actions/runner/issues/2058
|
|
run: |
|
|
export SOURCES="${SOURCES_1}${GITHUB_WORKSPACE}${SOURCES_2}"
|
|
envsubst '$PKG_VERSION $PKG_RELEASE $SOURCES $SOURCES_SHA' < cryptomator/dist/linux/makepkg/PKGBUILD.template > PKGBUILD
|
|
env:
|
|
PKG_VERSION: ${{ needs.get-version.outputs.semVerNum }}
|
|
PKG_RELEASE: 1
|
|
SOURCES_1: '"${_src_app_dir}::git+file://'
|
|
SOURCES_2: '/cryptomator"'
|
|
SOURCES_SHA: "'SKIP'"
|
|
- name: Build package with makepkg
|
|
run: >
|
|
sudo -u builder
|
|
env PKGDEST="$PKGDEST" SRCDEST="$SRCDEST"
|
|
makepkg --syncdeps --cleanbuild --noconfirm --log
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: arch-package
|
|
if-no-files-found: error
|
|
path: |
|
|
${{ env.PKGDEST }}/*.pkg.tar.zst
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: pkgbuild-file
|
|
if-no-files-found: error
|
|
path: |
|
|
cryptomator/dist/linux/makepkg/PKGBUILD.template
|
|
|
|
create-pr:
|
|
name: Create PR for aur repo
|
|
if: github.event_name == 'workflow_dispatch' && inputs.create-pr || github.event_name == 'release' && needs.get-version.outputs.versionType == 'stable'
|
|
runs-on: ubuntu-latest
|
|
needs: [get-version, makepkg]
|
|
container:
|
|
image: archlinux:base-devel
|
|
env:
|
|
PKGDEST: ${{ github.workspace }}/pkgdest
|
|
SRCDEST: ${{ github.workspace }}/srcdest
|
|
steps:
|
|
- name: Prepare pacman
|
|
run: |
|
|
pacman-key --init
|
|
pacman-key --populate archlinux
|
|
pacman -Syu --noconfirm --needed git base-devel sudo gnupg maven unzip github-cli curl
|
|
- name: Download source tarball and compute checksum
|
|
id: sha256
|
|
run: |
|
|
URL="https://github.com/cryptomator/cryptomator/archive/refs/tags/${TAG}.tar.gz"
|
|
curl --silent --fail-with-body --proto "=https" -L -H "Accept: application/vnd.github+json" ${URL} --output cryptomator.tar.gz
|
|
TARBALL_SHA256=$(sha256sum cryptomator.tar.gz | cut -d ' ' -f1)
|
|
echo "value=${TARBALL_SHA256}" >> "$GITHUB_OUTPUT"
|
|
env:
|
|
TAG: ${{ needs.get-version.outputs.semVerStr || github.event.release.tag_name }}
|
|
- name: Checkout cryptomator/aur repo
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: 'cryptomator/aur'
|
|
token: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
|
|
- name: Create build user
|
|
run: |
|
|
useradd -m builder
|
|
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/builder
|
|
chown -R builder:builder "$GITHUB_WORKSPACE"
|
|
install -d -m 0755 -o builder -g builder "$PKGDEST" "$SRCDEST"
|
|
- name: Import Cryptomator release signing key
|
|
# try first ubuntu. on failure try openpgp keyservers
|
|
run: >
|
|
sudo -u builder gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 58117AFA1F85B3EEC154677D615D449FE6E6A235
|
|
|| sudo -u builder gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 58117AFA1F85B3EEC154677D615D449FE6E6A235
|
|
- name: Checkout release branch
|
|
run: |
|
|
git config --global safe.directory '*'
|
|
git checkout -b release/${VERSION}
|
|
env:
|
|
VERSION: ${{ needs.get-version.outputs.semVerStr }}
|
|
- name: Determine pkgrel
|
|
id: pkgrel
|
|
run: |
|
|
CURRENT_VERSION="$(sed -nE 's/^pkgver=(.*)$/\1/p' PKGBUILD | head -n1)"
|
|
CURRENT_REL="$(sed -nE 's/^pkgrel=([0-9]+).*$/\1/p' PKGBUILD | head -n1)"
|
|
|
|
if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" && "$CURRENT_REL" =~ ^[0-9]+$ ]]; then
|
|
NEXT_REL=$((CURRENT_REL + 1))
|
|
else
|
|
NEXT_REL=1
|
|
fi
|
|
|
|
echo "value=${NEXT_REL}" >> "$GITHUB_OUTPUT"
|
|
echo "dist-version=${TARGET_VERSION}-${NEXT_REL}" >> "$GITHUB_OUTPUT"
|
|
env:
|
|
TARGET_VERSION: ${{ needs.get-version.outputs.semVerStr }}
|
|
- name: Download PKGBUILD template
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: pkgbuild-file
|
|
- name: Prepare PKGBUILD
|
|
run: |
|
|
envsubst '$PKG_VERSION $PKG_RELEASE $SOURCES $SOURCES_SHA' < PKGBUILD.template > PKGBUILD
|
|
sudo -u builder makepkg --printsrcinfo > .SRCINFO
|
|
env:
|
|
PKG_VERSION: ${{ needs.get-version.outputs.semVerNum }}
|
|
PKG_RELEASE: ${{ steps.pkgrel.outputs.value }}
|
|
SOURCES: |-
|
|
"cryptomator-${pkgver//_/-}.tar.gz::https://github.com/cryptomator/cryptomator/archive/refs/tags/${pkgver//_/-}.tar.gz"
|
|
"cryptomator-${pkgver//_/-}.tar.gz.asc::https://github.com/cryptomator/cryptomator/releases/download/${pkgver//_/-}/cryptomator-${pkgver//_/-}.tar.gz.asc"
|
|
SOURCES_SHA: |-
|
|
'${{steps.sha256.outputs.value}}'
|
|
'SKIP'
|
|
- name: Build package with makepkg
|
|
run: >
|
|
sudo -u builder
|
|
env PKGDEST="$PKGDEST" SRCDEST="$SRCDEST"
|
|
makepkg --syncdeps --cleanbuild --noconfirm --log
|
|
- name: Commit and push
|
|
run: |
|
|
git config user.name "cryptobot"
|
|
git config user.email "cryptobot@users.noreply.github.com"
|
|
git config push.autoSetupRemote true
|
|
git stage PKGBUILD .SRCINFO
|
|
git commit -m "Prepare release ${DIST_VERSION}"
|
|
git push
|
|
env:
|
|
DIST_VERSION: ${{ steps.pkgrel.outputs.dist-version }}
|
|
- name: Create pull request
|
|
id: create-pr
|
|
run: |
|
|
printf "Created by $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > pr_body.md
|
|
PR_URL=$(gh pr create --title "Release $DIST_VERSION" --body-file pr_body.md)
|
|
echo "url=$PR_URL" >> "$GITHUB_OUTPUT"
|
|
env:
|
|
DIST_VERSION: ${{ steps.pkgrel.outputs.dist-version }}
|
|
GH_TOKEN: ${{ secrets.CRYPTOBOT_PR_TOKEN }}
|
|
- name: Slack Notification
|
|
if: github.event_name == 'release'
|
|
uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2.4.0
|
|
env:
|
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_CRYPTOMATOR_DESKTOP }}
|
|
SLACK_USERNAME: 'Cryptobot'
|
|
SLACK_ICON: ''
|
|
SLACK_ICON_EMOJI: ':bot:'
|
|
SLACK_CHANNEL: 'cryptomator-desktop'
|
|
SLACK_TITLE: "AUR release PR created for ${{ github.event.repository.name }} ${{ steps.pkgrel.outputs.dist-version }} ."
|
|
SLACK_MESSAGE: "See <${{ steps.create-pr.outputs.url }}|PR> on how to proceed."
|
|
SLACK_FOOTER: ''
|
|
MSG_MINIMAL: true
|