-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update:workflows more release support
added:release.yml and issue-translator.yml
- Loading branch information
1 parent
94d98bb
commit fd761f5
Showing
6 changed files
with
284 additions
and
103 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Issue Translator | ||
on: | ||
issue_comment: | ||
types: [created] | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: usthe/issues-translate-action@v2.7 | ||
with: | ||
IS_MODIFY_TITLE: false | ||
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. |
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: release packet | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download ubuntubuild | ||
uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: ubuntubuild.yml | ||
workflow_conclusion: success | ||
check_artifacts: false | ||
skip_unpack: true | ||
if_no_artifact_found: fail | ||
path: ./XRelease/ | ||
- name: Download macbuild | ||
uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: macbuild.yml | ||
workflow_conclusion: success | ||
check_artifacts: false | ||
skip_unpack: true | ||
if_no_artifact_found: fail | ||
path: ./XRelease/ | ||
- name: Download msbuild | ||
uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: msbuild.yml | ||
workflow_conclusion: success | ||
check_artifacts: false | ||
skip_unpack: true | ||
if_no_artifact_found: fail | ||
path: ./XRelease/ | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -al ./XRelease/ | ||
|
||
- name: Get current version and increment X | ||
id: versioning | ||
run: | | ||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
echo "Latest tag: $latest_tag" | ||
# 提取 X 的值并递增 | ||
major=$(echo $latest_tag | cut -d '.' -f 1) | ||
minor=$(echo $latest_tag | cut -d '.' -f 2) | ||
patch=$(echo $latest_tag | cut -d '.' -f 3) | ||
build=$(echo $latest_tag | cut -d '.' -f 4) | ||
new_minor=$((minor + 1)) | ||
new_version="$major.$new_minor.$patch.$build" | ||
echo "New version: $new_version" | ||
echo "new_tag=$new_version" >> $GITHUB_OUTPUT | ||
echo "prev_tag=$latest_tag" >> $GITHUB_OUTPUT | ||
- name: Create and push new tag | ||
run: | | ||
git tag ${{ steps.versioning.outputs.new_tag }} | ||
git push origin ${{ steps.versioning.outputs.new_tag }} | ||
- name: Generate release notes | ||
run: | | ||
logs=$(git log ${{ steps.versioning.outputs.prev_tag }}..${{ steps.versioning.outputs.new_tag }} --pretty=format:"* %h - %s - %an" --no-merges) | ||
release_notes=$(echo "$logs" | sed 's/ qyt$/ @xengine-qyt/') | ||
echo "$release_notes" | ||
echo "$release_notes" > release_notes.txt | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
draft: false | ||
prerelease: false | ||
tag_name: ${{ steps.versioning.outputs.new_tag }} | ||
name: XEngine_StreamMedia ${{ steps.versioning.outputs.new_tag }} | ||
body_path: release_notes.txt | ||
files: ./XRelease/*.zip |
Oops, something went wrong.