-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
4 changed files
with
65 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,9 @@ jobs: | |
brew install gnu-tar | ||
cd core | ||
xmake pack -y --autobuild=n --basename=xmake -o ../artifacts xmakesrc | ||
xmake f --embed=y -c | ||
xmake | ||
cp build/xmake ../artifacts/xmake-bundle | ||
cd .. | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -61,6 +64,10 @@ jobs: | |
with: | ||
name: xmake-latest.zip | ||
path: artifacts/xmake.zip | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: xmake-bundle.macos.x86_64 | ||
path: artifact/xmake-bundle | ||
|
||
# upload artifacts to latest release | ||
- name: Get Previous tag | ||
|
@@ -119,3 +126,14 @@ jobs: | |
asset_path: artifacts/xmake.zip | ||
asset_name: xmake-${{ steps.tagName.outputs.tag }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Publish bundle binary | ||
if: github.event.action == 'published' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifacts/xmake-bundle | ||
asset_name: xmake-bundle-${{ steps.tagName.outputs.tag }}.macos.x86_64 | ||
asset_content_type: application/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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,16 +22,41 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# WyriHaximus/github-action-get-previous-tag@master need it | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Prepare local xmake | ||
run: cp -rf . ../xmake-source | ||
- uses: xmake-io/github-action-setup-xmake@v1 | ||
with: | ||
xmake-version: local#../xmake-source | ||
- uses: little-core-labs/[email protected] | ||
id: tagName | ||
|
||
- name: Tests | ||
run: | | ||
xmake lua -v -D tests/run.lua | ||
xrepo --version | ||
- name: Artifact | ||
run: | | ||
cd core | ||
xmake f --embed=y -c | ||
xmake | ||
cp build/xmake ../artifacts/xmake-bundle | ||
cd .. | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: xmake-bundle.macos.arm64 | ||
path: artifact/xmake-bundle | ||
|
||
- name: Publish bundle binary | ||
if: github.event.action == 'published' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifacts/xmake-bundle | ||
asset_name: xmake-bundle-${{ steps.tagName.outputs.tag }}.macos.arm64 | ||
asset_content_type: application/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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,10 @@ jobs: | |
- name: Build | ||
run: | | ||
cd core | ||
xmake f -vD -a ${{ matrix.arch }} | ||
xmake f -vD -a ${{ matrix.arch }} --embed=y -c | ||
xmake | ||
cp build/xmake.exe ../artifacts/${{env.RELEASE_NAME}}/xmake-bundle.exe | ||
xmake f -vD -a ${{ matrix.arch }} -c | ||
xmake -vD | ||
cd .. | ||
|
@@ -104,6 +107,13 @@ jobs: | |
name: xmake-latest.${{ env.RELEASE_NAME }}.sha256 | ||
path: artifacts/${{env.RELEASE_NAME}}/shafile | ||
|
||
- name: Upload artifacts (bundle) | ||
if: matrix.os == 'windows-2022' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: xmake-bundle-latest.${{env.RELEASE_NAME}}.exe | ||
path: artifacts/${{env.RELEASE_NAME}}/xmake-bundle.exe | ||
|
||
# upload artifacts to latest release | ||
- name: Inject slug/short variables | ||
uses: rlespinasse/[email protected] | ||
|
@@ -166,3 +176,14 @@ jobs: | |
asset_name: xmake-${{ steps.tagName.outputs.tag }}.${{ env.RELEASE_NAME }}.sha256 | ||
asset_content_type: application/zip | ||
|
||
- name: Publish | ||
if: github.event.action == 'published' && matrix.os == 'windows-2022' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifacts/${{env.RELEASE_NAME}}/xmake-bundle.exe | ||
asset_name: xmake-bundle-${{ steps.tagName.outputs.tag }}.${{ env.RELEASE_NAME }}.exe | ||
asset_content_type: application/zip | ||
|