-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
87 additions
and
3 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,71 @@ | ||
name: Build AltServer | ||
|
||
on: | ||
push: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
builder: [ghcr.io/nyamisty/altserver_builder_alpine_armv7, ghcr.io/nyamisty/altserver_builder_alpine_aarch64, ghcr.io/nyamisty/altserver_builder_alpine_amd64, ghcr.io/nyamisty/altserver_builder_alpine_i386] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master # set the branch to merge to | ||
fetch-depth: 0 | ||
submodules: recursive | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Prepare build | ||
run: mkdir /tmp/build_output | ||
- name: Build | ||
run: | | ||
image=${{ matrix.builder }} | ||
docker pull $image | ||
docker run -v ${PWD}:/workdir -w /workdir $image make NO_USBMUXD_STUB=1 NO_UPNP_STUB=1 -j3 | ||
mv AltServer-* /tmp/build_output | ||
git clean -fdX | ||
- name: Upload to github artifact | ||
uses: NyaMisty/upload-artifact-as-is@master | ||
with: | ||
path: /tmp/build_output | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
name: "release" | ||
steps: | ||
- name: "Create artifact directory" | ||
run: | | ||
mkdir -p build_output | ||
- name: "Download all artifacts" | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: build_output | ||
- name: "Rearrange artifacts" | ||
run: | | ||
find build_output | ||
mkdir -p build_release | ||
mv build_output/*/* build_release | ||
ls build_release | ||
if [ "$(ls -A build_release)" ]; then exit 0; else exit 1; fi | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
with: | ||
files: build_release/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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
9a33a79
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May i suggest to add the notes to use the container way into the readme?