Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tihmstar committed Jul 26, 2024
1 parent aab96cc commit c49fd0c
Showing 1 changed file with 17 additions and 30 deletions.
47 changes: 17 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
BUILDROOT: "buildroot_${{ matrix.platform }}"

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pre-dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
Expand All @@ -33,24 +35,25 @@ jobs:
run: make
- name: make install
run: make DESTDIR=$GITHUB_WORKSPACE/$BUILDROOT install
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILDROOT }}
path: ${{ env.BUILDROOT }}

release:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download ubuntu artifact
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: buildroot_ubuntu-latest
path: buildroot_ubuntu-latest
- name: Download macos artifact
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: buildroot_macos-latest
path: buildroot_macos-latest
Expand All @@ -64,32 +67,16 @@ jobs:
zip -r buildroot_ubuntu-latest.zip buildroot_ubuntu-latest
- name: Create Release
id: create_release
uses: actions/[email protected]
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: false
draft: false
tag_name: ${{ env.BUILD_VERSION_NUM }}
release_name: Build ${{ env.BUILD_VERSION_STR }}
name: Build ${{ env.BUILD_VERSION_STR }}
body: ${{ env.COMMIT_MSG }}
draft: false
prerelease: false
- name: Upload Release Asset ubuntu
id: upload-release-asset-ubuntu
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: buildroot_ubuntu-latest.zip
asset_name: buildroot_ubuntu-latest.zip
asset_content_type: application/zip
- name: Upload Release Asset macos
id: upload-release-asset-macos
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: buildroot_macos-latest.zip
asset_name: buildroot_macos-latest.zip
asset_content_type: application/zip
files: |
buildroot_ubuntu-latest.zip
buildroot_macos-latest.zip

0 comments on commit c49fd0c

Please sign in to comment.