-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #318 from lockdown-systems/317-linux-releases
Create workflow to make x64 and arm64 linux builds
- Loading branch information
Showing
7 changed files
with
123 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
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/cyd_*.deb | ||
|
||
- name: Upload RPM artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: rpm-packages-x86_64 | ||
path: out/make/rpm/x64/cyd-*.rpm | ||
|
||
- name: Upload ZIP artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: zip-packages-x86_64 | ||
path: out/make/zip/linux/x64/Cyd-*.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/cyd_*.deb | ||
|
||
- name: Upload RPM artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: rpm-packages-arm64 | ||
path: out/make/rpm/arm64/cyd-*.rpm | ||
|
||
- name: Upload ZIP artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: zip-packages-arm64 | ||
path: out/make/zip/linux/arm64/Cyd-*.zip |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
CYD_VERSION=$(cat package.json | grep '"version"' | cut -d'"' -f4) | ||
if [[ "$CYD_VERSION" == *-dev ]]; then | ||
npm run make-dev-linux | ||
else | ||
npm run make-prod-linux | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.