Update CI.yml #4
This file contains hidden or 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: Build modules | |
| on: | |
| push: | |
| paths-ignore: | |
| - "**/*.md" | |
| - '**/*.txt' | |
| pull_request: | |
| paths-ignore: | |
| - "**/*.md" | |
| - '**/*.txt' | |
| workflow_dispatch: | |
| # for release create | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_elf: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Get Latest SDK Release Info | |
| id: sdk-release | |
| uses: actions/github-script@v6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const release = await github.rest.repos.getLatestRelease({ | |
| owner: 'ps5-payload-dev', | |
| repo: 'sdk' | |
| }); | |
| core.setOutput('download_url', release.data.assets.find(asset => asset.name.endsWith('.zip')).browser_download_url); | |
| - name: Download Latest SDK | |
| run: | | |
| curl -L "${{ steps.sdk-release.outputs.download_url }}" -o ps5-sdk.zip | |
| mkdir -p ${{ runner.tool_cache }}/ps5-payload-sdk | |
| unzip ps5-sdk.zip -d ${{ runner.tool_cache }}/ps5-payload-sdk | |
| echo PS5_PAYLOAD_SDK=${{ runner.tool_cache }}/ps5-payload-sdk/ps5-payload-sdk >> $GITHUB_ENV | |
| chmod 0777 -R ${{ runner.tool_cache }}/ps5-payload-sdk/ps5-payload-sdk | |
| - name: Checkout Payload | |
| uses: actions/checkout@v3 | |
| - name: Build GoldHEN-to-etaHEN-Ported-Plugins-Binaries | |
| run: bash ./build.sh | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: etaHEN-Plugins-Binaries | |
| path: | | |
| plugin_src//bin/*.elf | |
| plugin_src//bin/*.plugin | |
| - name: Create Release | |
| if: github.event_name != 'pull_request' | |
| working-directory: bin/plugins | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| tt="${{ env.commit_ver }}-${{ env.commit_hash }}" | |
| gh release create $tt ${{ env.ZIP_NAME }}.zip --target ${{ GITHUB.SHA }} -t $tt -F hash.md -p |