Updated GDB workflow

This commit is contained in:
takeshix 2021-04-19 16:06:40 +02:00
parent 4dd18e112a
commit 349f0d7f3e

View file

@ -123,42 +123,42 @@ jobs:
name: ${{ steps.build_gdb.outputs.PACKAGED_NAME }} name: ${{ steps.build_gdb.outputs.PACKAGED_NAME }}
path: ${{ steps.build_gdb.outputs.PACKAGED_NAME_PATH }} path: ${{ steps.build_gdb.outputs.PACKAGED_NAME_PATH }}
create-release: create-release:
name: Create GDB & gdbserver Release name: Create GDB & gdbserver Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-x86, build-x86_64, build-armhf, build-aarch64] needs: [build-x86, build-x86_64, build-armhf, build-aarch64]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Prepare Environment - name: Prepare Environment
run: mkdir /tmp/releases run: mkdir /tmp/releases
- name: Download Artifacts - name: Download Artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
path: /tmp/releases path: /tmp/releases
- name: List Artifacts - name: List Artifacts
run: ls -laR /tmp/releases run: ls -laR /tmp/releases
- name: Tag Release - name: Tag Release
id: tag_release id: tag_release
run: | run: |
set +e set +e
if [ $(git tag "gdb-v${{ needs.build-x86.outputs.version }}") ];then if [ $(git tag "gdb-v${{ needs.build-x86.outputs.version }}") ];then
git push origin "gdb-v${{ needs.build-x86.outputs.version }}" git push origin "gdb-v${{ needs.build-x86.outputs.version }}"
echo ::set-output name=NEW_RELEASE::"true" echo ::set-output name=NEW_RELEASE::"true"
else else
echo "Tag for version ${{ needs.build-x86.outputs.version }} already exists. Skipping release creation." echo "Tag for version ${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false" echo ::set-output name=NEW_RELEASE::"false"
fi fi
- name: Create Release - name: Create Release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
if: ${{ steps.tag_release.outputs.NEW_RELEASE == 'true' }} if: ${{ steps.tag_release.outputs.NEW_RELEASE == 'true' }}
with: with:
name: gdb-v${{ needs.build-x86.outputs.version }} name: gdb-v${{ needs.build-x86.outputs.version }}
tag: gdb-v${{ needs.build-x86.outputs.version }} tag: gdb-v${{ needs.build-x86.outputs.version }}
artifacts: "/tmp/releases/*/*" artifacts: "/tmp/releases/*/*"
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}