mirror of
https://github.com/radareorg/r2yara.git
synced 2026-11-07 06:36:02 -10:00
Update gh actions versions
This commit is contained in:
1 parent
bb7130e5fc
commit
2d7d09b705
1 file changed
+25
-32
+25
-32
@@ -15,7 +15,7 @@ jobs:
|
||||
build-linux20:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Installing radare2
|
||||
run: |
|
||||
wget "https://github.com/radareorg/radare2/releases/download/${R2V}/radare2_${R2V}_amd64.deb"
|
||||
@@ -32,14 +32,14 @@ jobs:
|
||||
- name: Packaging
|
||||
run: make -C dist/debian
|
||||
- name: Pub
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-linux
|
||||
path: dist/debian/*.deb
|
||||
build-linux22:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Installing radare2
|
||||
run: |
|
||||
git clone --depth=1 https://github.com/radareorg/radare2 && cd radare2
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
runs-on: macos-11
|
||||
# runs-on: macos-12 # maybe this version have aclocal
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: brew install pkg-config
|
||||
- name: Building Radare2 from git
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
# - name: Packaging
|
||||
# run: make -C dist/macos
|
||||
# - name: Pub
|
||||
# uses: actions/upload-artifact@v3
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# if-no-files-found: error
|
||||
# name: build-macos
|
||||
@@ -90,12 +90,20 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Download all git history and tags
|
||||
- name: Check if is a release
|
||||
run: git describe --exact-match --tags ${{ github.sha }} | awk 'BEGIN{tag="-";r="no"}/^[0-9]+\.[0-9]+/{tag=$0;r="yes"};END{print "::set-output name=is::"r;print "::set-output name=tag::"tag}'
|
||||
run: |
|
||||
TAG="`git describe --exact-match --tags ${{ github.sha }} || true`"
|
||||
if [ -n "$TAG" ]; then
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
echo "is=yes" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "is=no" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
id: release
|
||||
|
||||
release:
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.check_release.outputs.is_release == 'yes' }}
|
||||
needs:
|
||||
@@ -103,44 +111,29 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Download all git history and tags
|
||||
- name: Extract r2f version
|
||||
run: echo "##[set-output name=branch;]$( ./configure -qV )"
|
||||
shell: bash
|
||||
run: echo "branch=`./configure -qV`" >> $GITHUB_OUTPUT
|
||||
id: r2fv
|
||||
- name: Prepare release notes
|
||||
run: echo Release > ./RELEASE_NOTES.md
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist/artifacts
|
||||
- name: Create GitHub release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
uses: softprops/action-gh-release@v2.0.4
|
||||
with:
|
||||
name: ${{ steps.r2fv.outputs.branch }}
|
||||
tag_name: ${{ needs.check_release.outputs.tag_name }}
|
||||
release_name: ${{ steps.r2fv.outputs.branch }}
|
||||
body_path: ./RELEASE_NOTES.md
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload asset for Linux
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/artifacts/build-linux/r2yara_${{ steps.r2fv.outputs.branch }}_amd64.deb
|
||||
asset_name: r2yara_${{ steps.r2fv.outputs.branch }}_amd64.deb
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
- name: Upload asset for macOS
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: dist/artifacts/build-macos/r2yara-${{ steps.r2fv.outputs.branch }}-x64.pkg
|
||||
asset_name: r2yara-${{ steps.r2fv.outputs.branch }}-x64.pkg
|
||||
asset_content_type: application/octet-stream
|
||||
generate_release_notes: false
|
||||
files: |
|
||||
dist/artifacts/build-linux/r2yara_${{ steps.r2fv.outputs.branch }}_amd64.deb
|
||||
# dist/artifacts/build-macos/r2yara-${{ steps.r2fv.outputs.branch }}-x64.pkg
|
||||
Reference in new issue
Block a user