Skip to content

Update submodules #1522

Update submodules

Update submodules #1522

Workflow file for this run

name: Build
on:
push:
branches:
- master
paths:
- lisp/**
- cmds/**
- src/**
- test/**
- '**.yml'
- '**.json'
- 'eask'
# ignore
- '!**/docs.yml'
pull_request:
branches:
- master
paths-ignore:
- '**/docs.yml'
- '**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
VERSION: 0.12.10
REPO_BIN: 'emacs-eask/binaries'
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: jcs-actions/delete-tag-and-release@master
if: github.ref == 'refs/heads/master'
continue-on-error: true
with:
delete_release: true
tag_name: ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
build:
needs: [prepare]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: linux-arm64
ext: tar.gz
- target: linux-x64
ext: tar.gz
- target: macos-arm64
ext: tar.gz
- target: macos-x64
ext: tar.gz
- target: win-arm64
ext: zip
- target: win-x64
ext: zip
steps:
- uses: actions/checkout@v7
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --assume-yes qemu-user-binfmt
- uses: MOZGIII/install-ldid-action@master
with:
tag: v2.1.5-procursus7
- name: Preparing...
run: npm install --include=dev
- name: Building...
run: npm run-script pkg-${{ matrix.target }}
- name: Prepare content...
run: |
mv lisp dist
mv LICENSE dist
mv README.md dist
- name: Change permissions (Unix)
if: contains(fromJSON('["tar.gz"]'), matrix.ext)
run: |
chmod -R 777 ./dist
- name: Tar dist (Unix)
if: contains(fromJSON('["tar.gz"]'), matrix.ext)
run: |
tar -czf ${{ matrix.target }}.${{ matrix.ext }} -C ./dist/ .
cp ${{ matrix.target }}.${{ matrix.ext }} eask_${{ env.VERSION }}_${{ matrix.target }}.${{ matrix.ext }}
- name: Zipping dist (Windows)
if: contains(fromJSON('["zip"]'), matrix.ext)
working-directory: dist
run: |
zip -r ${{ matrix.target }}.${{ matrix.ext }} .
mv ${{ matrix.target }}.${{ matrix.ext }} ../
cd ..
cp ${{ matrix.target }}.${{ matrix.ext }} eask_${{ env.VERSION }}_${{ matrix.target }}.${{ matrix.ext }}
- name: Upload for prerelease
if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1.21.0
with:
token: ${{ secrets.PAT }}
tag: ${{ env.VERSION }}
allowUpdates: true
prerelease: true
draft: false
artifacts: eask_${{ env.VERSION }}_${{ matrix.target }}.${{ matrix.ext }}
#### Upload an artifact for testing purposes
- name: Upload for tests
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target }}
path: dist
#### Prepare to push to `binaries` repository!
- name: Move tar to HOME
run: mv ${{ matrix.target }}.${{ matrix.ext }} ~/
- name: Checkout binaries repository
uses: actions/checkout@v7
with:
repository: ${{ env.REPO_BIN }}
persist-credentials: false
fetch-depth: 1
- name: Clean up previous binaries
continue-on-error: true
run: rm -rf eask/${{ matrix.target }}.${{ matrix.ext }}
- name: Move binaries to repository
run: mv ~/${{ matrix.target }}.${{ matrix.ext }} ./
- name: Set git config
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Commit
continue-on-error: true
run: |
git pull
git add .
git commit -m "Update binaries ${{ matrix.target }}.${{ matrix.ext }}"
- name: Push
if: github.ref == 'refs/heads/master'
uses: jcs-actions/github-push-action@master
with:
repository: ${{ env.REPO_BIN }}
github_token: ${{ secrets.PAT }}
branch: master
rebase: true
retry: 7