Merge pull request #376 from lockdown-systems/release-1.0.26 #32
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: Release for Linux | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build-x86_64: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Make sure the version string matches the tag | |
run: | | |
CYD_VERSION=$(cat package.json | grep '"version"' | cut -d'"' -f4) | |
TAG_VERSION=${GITHUB_REF#refs/tags/} | |
TAG_VERSION=${TAG_VERSION#v} # strip the leading 'v' from the tag | |
if [ "$CYD_VERSION" != "$TAG_VERSION" ]; then | |
echo "::error file=package.json,title=Version check failed::Version string in package.json $CYD_VERSION does not match the tag $TAG_VERSION" | |
exit 1 | |
fi | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
run: | | |
docker buildx create --use | |
docker buildx build -t my-builder --load . | |
- name: Build Linux release in Docker container | |
run: docker run --rm -v $(pwd):/workspace -w /workspace my-builder ./scripts/make-linux-release.sh | |
- name: Upload DEB artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: deb-packages-x86_64 | |
path: out/make/deb/x64/*.deb | |
- name: Upload RPM artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rpm-packages-x86_64 | |
path: out/make/rpm/x64/*.rpm | |
- name: Upload ZIP artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: zip-packages-x86_64 | |
path: out/make/zip/linux/x64/*.zip | |
build-arm64: | |
runs-on: ubuntu-arm64 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Make sure the version string matches the tag | |
run: | | |
CYD_VERSION=$(cat package.json | grep '"version"' | cut -d'"' -f4) | |
TAG_VERSION=${GITHUB_REF#refs/tags/} | |
TAG_VERSION=${TAG_VERSION#v} # strip the leading 'v' from the tag | |
if [ "$CYD_VERSION" != "$TAG_VERSION" ]; then | |
echo "::error file=package.json,title=Version check failed::Version string in package.json $CYD_VERSION does not match the tag $TAG_VERSION" | |
exit 1 | |
fi | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
run: | | |
docker buildx create --use | |
docker buildx build -t my-builder --load . | |
- name: Build Linux release in Docker container | |
run: docker run --rm -v $(pwd):/workspace -w /workspace my-builder ./scripts/make-linux-release.sh | |
- name: Upload DEB artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: deb-packages-arm64 | |
path: out/make/deb/arm64/*.deb | |
- name: Upload RPM artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rpm-packages-arm64 | |
path: out/make/rpm/arm64/*.rpm | |
- name: Upload ZIP artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: zip-packages-arm64 | |
path: out/make/zip/linux/arm64/*.zip |