Skip to content

Use min of 1 px thickness #7

Use min of 1 px thickness

Use min of 1 px thickness #7

Workflow file for this run

name: Build Amethyst
on:
push:
paths-ignore:
- "**/*.md"
- 'src/renderer/locales/**'
- 'scripts/localizationStatus.js'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
cache: "yarn"
- name: Install gcc dependencies
run: sudo apt update && sudo apt install gcc-multilib g++-multilib libvips
- name: Install Dependencies
run: yarn install
- name: Install Test Dependencies
run: yarn playwright install
- name: Run tests
run: yarn test
lint:
name: Check for lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
cache: "yarn"
- name: Install gcc dependencies
run: sudo apt update && sudo apt install gcc-multilib g++-multilib libvips
- name: Install Dependencies
run: yarn install
- name: Run eslint
run: yarn lint
build-windows:
name: Build Windows
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
cache: "yarn"
- name: Install Dependencies
run: yarn install
- name: Build Amethyst
run: yarn package
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: artifact-windows
path: |
release/build/*.yml
release/build/*.yaml
release/build/*.exe*
build-macos:
name: Build MacOS
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
cache: "yarn"
- name: Install Dependencies
run: yarn install
- name: Build Amethyst
run: USE_HARD_LINKS=false yarn package
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: artifact-macos
path: |
release/build/*.yml
release/build/*.dmg
release/build/*.dmg.*
release/build/*.zip
release/build/*.zip.*
build-linux:
name: Build Linux
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
cache: "yarn"
- name: Install linux dependencies
run: sudo apt update && sudo apt install libvips libvips-dev libvips-tools rpm snapd libarchive-tools && sudo snap install snapcraft --classic && sudo snap install multipass --beta --classic
- name: Install Dependencies
run: yarn install
- name: Build Amethyst
run: yarn package
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: artifact-linux
path: |
release/build/*.yml
release/build/*.yaml
release/build/*.AppImage
release/build/*.rpm
release/build/*.deb
release/build/*.pacman
release/build/*.snap
release-to-aur-git:
name: Release to AUR -git
runs-on: ubuntu-latest
# If we can't build, we should not release to AUR
needs: [build-linux]
if: needs.build-linux.result == 'success' && github.ref == 'refs/heads/master' && github.repository_owner == 'Geoxor'
env:
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
COMMIT_LONGHASH: ${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to AUR
run: |
mkdir -p ~/.ssh
echo "$AUR_SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "Host aur.archlinux.org" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
echo " StrictHostKeyChecking no" >> ~/.ssh/config
echo " User aur" >> ~/.ssh/config
- name: Publish to AUR
run: |
PACKAGE_VERSION=$(cat package.json | jq ".version" | sed -e 's/\"//g')
COMMIT_SHORTHASH=$(echo $COMMIT_LONGHASH | cut -c1-7)
git clone ssh://aur@aur.archlinux.org/amethyst-player-git.git
cd amethyst-player-git
PKG_REVISION=$(grep -oP 'pkgver=v.*r\K.*' PKGBUILD | grep -oP "\d+" | head -n 1)
PKG_NEXT_REVISION=$((PKG_REVISION + 1))
PKG_VERSION=v${PACKAGE_VERSION}.r${PKG_NEXT_REVISION}.g${COMMIT_SHORTHASH}
git config user.email "github-actions@github.com"
git config user.name "GitHub Actions"
sed -i -E "s/pkgver=.*/pkgver=$PKG_VERSION/g" PKGBUILD
sed -i -E "s/pkgver = .*/pkgver = $PKG_VERSION/g" .SRCINFO
git add PKGBUILD .SRCINFO
git commit -m "Update to $PKG_VERSION (Git ref: $COMMIT_LONGHASH)"
git push origin master
publish-releases:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-windows, build-macos, build-linux]
name: Publish Releases
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
pattern: artifact-*
merge-multiple: true
- name: Post Releases
uses: ncipollo/release-action@v1
with:
artifacts: "*"