Skip to content

Commit

Permalink
CI: Improve release procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniovazquezblanco committed Dec 31, 2023
1 parent e888dff commit 89d89c2
Showing 1 changed file with 35 additions and 8 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,39 @@ jobs:
gradle-version: 7.3
arguments: -PGHIDRA_INSTALL_DIR=${{ env.GHIDRA_INSTALL_DIR }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v')
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: dist/*GhidraDeviceTreeBlob.zip
prerelease: ${{ github.ref == 'refs/heads/main' }}
overwrite: true
name: DeviceTreeBlob_Ghidra_${{ matrix.ghidra }}
path: dist/*GhidraDeviceTreeBlob.zip

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

steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Download binaries
uses: actions/download-artifact@v4

- name: Release nightly
if: github.ref == 'refs/heads/main'
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Ghidra DeviceTreeBlob Nightly (${{steps.date.outputs.date}})"
files: DeviceTreeBlob_Ghidra_*/*GhidraDeviceTreeBlob.zip

- name: Release stable
if: contains(github.ref, 'refs/tags/v')
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
title: "Ghidra DeviceTreeBlob ${{github.ref_name}}"
files: DeviceTreeBlob_Ghidra_*/*GhidraDeviceTreeBlob.zip

0 comments on commit 89d89c2

Please sign in to comment.