-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,24 +54,21 @@ jobs: | |
#在每个作业开始之前, GitHub 将为作业提取安装访问令牌。 令牌在作业完成后过期。 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
release_name: SmsForwarder ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
# 获取apk版本号 | ||
- name: Get Date | ||
uses: ajilraju/[email protected] | ||
# 获取当前日期 | ||
- name: Get Current Date | ||
id: get-date | ||
with: | ||
args: date +%Y%m%d | ||
result-encoding: string | ||
run: echo "::set-output name=date::$(date +'%Y%m%d')" | ||
# 获取apk版本号 | ||
- name: Get Version Name | ||
uses: actions/github-script@v3 | ||
id: get-version | ||
with: | ||
script: | | ||
const str=process.env.GITHUB_REF; | ||
return str.substring(str.indexOf("v")); | ||
return str.substring(str.indexOf("v")+1); | ||
result-encoding: string | ||
# 存档打包的文件 | ||
- name: Archive production artifacts | ||
|
@@ -87,6 +84,6 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # 上传网址,无需改动 | ||
asset_path: app/build/outputs/apk/release/SmsForwarder_release_${{steps.get-date.outputs.result}}_${{steps.get-version.outputs.result}}.apk # 上传路径 | ||
asset_name: SmsForwarder_release_${{steps.get-date.outputs.result}}_${{steps.get-version.outputs.result}}.apk # 资源名 | ||
asset_path: app/build/outputs/apk/release/SmsForwarder_release_${{steps.get-date.outputs.date}}_${{steps.get-version.outputs.result}}.apk # 上传路径 | ||
asset_name: SmsForwarder_release_${{steps.get-date.outputs.date}}_${{steps.get-version.outputs.result}}.apk # 资源名 | ||
asset_content_type: application/vnd.android.package-archiv #资源类型 |
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