upload on tag #11
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
name: Build | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
prepare-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and export | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: builder-image:latest | |
outputs: type=docker,dest=/tmp/builder-image.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: builder-image | |
path: /tmp/builder-image.tar | |
build-emacs: | |
runs-on: ubuntu-latest | |
needs: prepare-docker | |
strategy: | |
matrix: | |
source: | |
- name: "29.1" | |
tarball: "https://ftp.gnu.org/gnu/emacs/emacs-29.1.tar.gz" | |
tarball_dir: "emacs-29.1" | |
- name: "29.1_native_json_rpc" | |
repo: "blahgeek/emacs" | |
commit: "b8e9c30dcae19eaa8deed9bd594e84d5cf6244cb" | |
build_with_x11: [ "yes", "no" ] | |
steps: | |
- name: Install fuse | |
run: sudo apt-get install -y fuse libfuse2 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download emacs source from tarball | |
run: | | |
curl -L ${{ matrix.source.tarball }} | tar xz | |
mv ${{ matrix.source.tarball_dir }} emacs-src | |
if: ${{ matrix.source.tarball }} | |
- name: Download emacs source from repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ matrix.source.repo }} | |
ref: ${{ matrix.source.commit }} | |
path: emacs-src | |
if: ${{ matrix.source.repo }} | |
- name: Download artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: builder-image | |
path: /tmp | |
- name: Load image | |
run: | | |
docker load -i /tmp/builder-image.tar | |
docker image ls -a | |
- name: Run and package | |
run: ./run-and-package.sh builder-image:latest ./emacs-src BUILD_WITH_X11=${{ matrix.build_with_x11 }} BUILD_RUN_AUTOGEN=${{ matrix.source.repo && 'yes' || 'no' }} | |
- name: Upload binary to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/Emacs.AppImage | |
asset_name: Emacs-${{ matrix.source.name }}-${{ matrix.build_with_x11 == 'yes' && 'x11' || 'nox' }}.AppImage | |
tag: ${{ github.ref }} |