ci: upload artifacts if it's not a release #7
Workflow file for this run
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: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: pip install -r requirements.txt | |
- run: mkdir out_dir | |
- name: set default frida version | |
run: echo "FRIDA_VERSION=16.2.5" >> $GITHUB_ENV | |
- name: get frida version from tag | |
if: startsWith(github.ref, 'refs/tags/') | |
run: echo "FRIDA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: patch frida-gadget-android-arm64 | |
run: | | |
FILE="frida-gadget-${{ env.FRIDA_VERSION }}-android-arm64.so" | |
URL="https://github.com/frida/frida/releases/download/${{ env.FRIDA_VERSION }}/$FILE.xz" | |
curl -L $URL | xz -d > $FILE | |
sha256sum $FILE | |
python src/frida-patcher.py -b $FILE -o out_dir/$FILE | |
sha256sum out_dir/$FILE | |
xz -z out_dir/$FILE | |
- name: patch frida-gadget-android-arm | |
run: | | |
FILE="frida-gadget-${{ env.FRIDA_VERSION }}-android-arm.so" | |
URL="https://github.com/frida/frida/releases/download/${{ env.FRIDA_VERSION }}/$FILE.xz" | |
curl -L $URL | xz -d > $FILE | |
sha256sum $FILE | |
python src/frida-patcher.py -b $FILE -o out_dir/$FILE | |
sha256sum out_dir/$FILE | |
xz -z out_dir/$FILE | |
- uses: actions/upload-artifact@v4 | |
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: frida-gadget | |
path: out_dir/*.xz | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: out_dir/*.xz |