Update:v6.8.1(1560) #26
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
name: release | |
on: | |
push: | |
paths: | |
- 'Surfing.json' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
isAlpha: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Get version number | |
id: version | |
run: | | |
version=$(grep 'version=' module.prop | awk -F '=' '{print $2}') | |
echo "TAG_NAME=${version}" >> $GITHUB_ENV | |
echo "Version extracted: ${version}" | |
- name: Run build.sh | |
run: sh build.sh | |
- name: Determine Tag Name | |
id: tag | |
run: echo "TAG_NAME=${{ env.TAG_NAME }}" >> $GITHUB_ENV | |
- name: Get Latest Changelog | |
id: changelog | |
run: | | |
latest_version=$(grep -m1 '^## v[0-9.]\+' changelog.md | sed 's/## v//') | |
sed -n "/^## v${latest_version}/,/^##/p" changelog.md | grep -v '## ' > release_notes.txt | |
echo "CHANGELOG=release_notes.txt" >> $GITHUB_ENV | |
- name: Upload Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.TAG_NAME }} | |
files: Surfing_v*.zip | |
generate_release_notes: false | |
body_path: release_notes.txt | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |