This commit is contained in:
Ylarod
2023-07-18 17:10:31 +08:00
parent f7e24b7d23
commit b18d6ad9e8

View File

@@ -19,12 +19,11 @@ jobs:
steps: steps:
- name: Pull Frida Latest Release - name: Pull Frida Latest Release
id: pullFridaLatestRelease id: pullFridaLatestRelease
uses: actions/github-script@v6.4.1 uses: actions/github-script@v3.1.0
with: with:
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const { GitHub } = require('@actions/github/lib/utils'); const releaseResponse = await github.repos.getLatestRelease({
const releaseResponse = await GitHub.repos.getLatestRelease({
owner: 'frida', owner: 'frida',
repo: 'frida', repo: 'frida',
}) })
@@ -43,14 +42,13 @@ jobs:
- name: Check release version - name: Check release version
id: checkReleaseVersion id: checkReleaseVersion
uses: actions/github-script@v6.4.1 uses: actions/github-script@v3.1.0
with: with:
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const { GitHub } = require('@actions/github/lib/utils');
try { try {
const releaseVersion = '${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}' const releaseVersion = '${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}'
const releaseResponse = await GitHub.repos.getReleaseByTag({ const releaseResponse = await github.repos.getReleaseByTag({
owner: '${{ steps.split_name.outputs.owner }}', owner: '${{ steps.split_name.outputs.owner }}',
repo: '${{ steps.split_name.outputs.repo }}', repo: '${{ steps.split_name.outputs.repo }}',
tag: releaseVersion tag: releaseVersion
@@ -149,14 +147,13 @@ jobs:
- name: Check release version - name: Check release version
id: checkReleaseVersion id: checkReleaseVersion
uses: actions/github-script@v6.4.1 uses: actions/github-script@v3.1.0
with: with:
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
const { GitHub } = require('@actions/github/lib/utils');
try { try {
const releaseVersion = '${{ needs.check_version.outputs.FRIDA_VERSION }}' const releaseVersion = '${{ needs.check_version.outputs.FRIDA_VERSION }}'
const releaseResponse = await GitHub.repos.getReleaseByTag({ const releaseResponse = await github.repos.getReleaseByTag({
owner: '${{ steps.split_name.outputs.owner }}', owner: '${{ steps.split_name.outputs.owner }}',
repo: '${{ steps.split_name.outputs.repo }}', repo: '${{ steps.split_name.outputs.repo }}',
tag: releaseVersion tag: releaseVersion