Ignore error when deleting latest tag #16
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
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ghidra: | |
- "11.1.2" | |
- "11.1.1" | |
- "11.1" | |
- "11.0.3" | |
- "11.0.2" | |
- "11.0.1" | |
- "11.0" | |
- "10.4" | |
- "10.3.3" | |
- "10.3.2" | |
- "10.3.1" | |
- "10.3" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: gradle/actions/setup-gradle@v3 | |
- uses: antoniovazquezblanco/[email protected] | |
with: | |
auth_token: ${{ secrets.GITHUB_TOKEN }} | |
version: ${{ matrix.ghidra }} | |
- name: Build extension | |
run: ./gradlew -PGHIDRA_INSTALL_DIR=${{ env.GHIDRA_INSTALL_DIR }} | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Falcon for Ghidra ${{ matrix.ghidra }} | |
path: dist/ghidra_*.zip | |
if-no-files-found: error | |
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: Checkout source for nightly release removal | |
uses: actions/checkout@v4 | |
if: github.ref == 'refs/heads/master' | |
- name: Remove previous nightly release | |
if: github.ref == 'refs/heads/master' | |
run: | | |
git fetch --tags | |
gh release delete latest -y || true | |
git push --delete origin latest || true | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
- name: Release nightly | |
if: github.ref == 'refs/heads/master' | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: "latest" | |
prerelease: true | |
title: "Ghidra Falcon Nightly (${{steps.date.outputs.date}})" | |
files: Falcon*/*.zip | |
fail_on_unmatched_files: true | |
- name: Release stable | |
if: contains(github.ref, 'refs/tags/v') | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: false | |
title: "Ghidra Falcon ${{github.ref_name}}" | |
files: Falcon*/*.zip | |
fail_on_unmatched_files: true |