-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from HXSecurity/main
changelog
- Loading branch information
Showing
4 changed files
with
41 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
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
name: Build DongTai Core Package and push to Ali OSS | ||
|
||
on: | ||
push: | ||
branches: [ "release-*" ] | ||
release: | ||
types: [ created, edited ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
strategy: | ||
max-parallel: 4 | ||
|
@@ -22,25 +24,26 @@ jobs: | |
|
||
- id: release | ||
run: | | ||
VERSION=`echo ${GITHUB_REF##*/} | awk -F'-' '{print $2}'` | ||
echo "::set-output name=VERSION::$VERSION" | ||
- name: Get release version | ||
id: get_release_version | ||
run: | | ||
V=`echo ${{ steps.release.outputs.VERSION }} | sed -e's/v//g' | sed -e's/V//g'`; \ | ||
echo ::set-output name=VERSION::${V} | ||
TAG_NAME=${{ github.event.release.tag_name }} | ||
ID=`echo ${TAG_NAME##v}` | ||
echo "::set-output name=VERSION::$ID" | ||
- name: Generate version file | ||
run: | | ||
cd ${{ github.workspace }} && \ | ||
echo "${{ github.event.repository.name }},version,${{ steps.get_release_version.outputs.VERSION }}" >> version.txt && \ | ||
echo "${{ github.event.repository.name }},version,${{ steps.release.outputs.VERSION }}" >> version.txt && \ | ||
echo "${{ github.event.repository.name }},commit_hash,${GITHUB_SHA}" >> version.txt \ | ||
- name: Replace setup cfg | ||
run: | | ||
sed -i -e 's/version = .*$/version = ${{ steps.get_release_version.outputs.VERSION }}/g' setup.cfg | ||
git config --global user.name 'exexute' | ||
git config --global user.email '[email protected]' | ||
git checkout -b "release-${{ steps.release.outputs.VERSION }}" | ||
sed -i -e 's/version = .*$/version = ${{ steps.release.outputs.VERSION }}/g' setup.cfg | ||
cat setup.cfg | ||
git add . | ||
git commit -m "Update: change version to $NEW_VERSION" | ||
git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" HEAD:"release-$NEW_VERSION" | ||
- name: Build DongTai Core Package | ||
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
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