Work please? #274
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
on: | |
push: | |
branch: | |
- 'development' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: versions | |
run: | | |
export SGD_VERSION=$(cat mission/version.hpp | grep VERSION | awk '{print $3}' | sed 's/[^a-zA-Z0-9.]//g') | |
export BN_VERSION=$(git rev-parse HEAD | cut -c 1-8) | |
echo "SGD_VERSION=${SGD_VERSION}" >> $GITHUB_ENV | |
echo "BN_VERSION=${BN_VERSION}" >> $GITHUB_ENV | |
- name: generate release text | |
run: | | |
export COMMIT_MSG=$(git log -n 1 --format="%h: %s %n%n %b") | |
echo -e "Release using SGD version ${SGD_VERSION} and BN version ${BN_VERSION}\n\n" >> RELEASE.md | |
echo -e "${COMMIT_MSG}" >> RELEASE.md | |
- name: build zipfiles | |
run: chmod +x build_release.sh && ./build_release.sh | |
- name: tag zipfiles | |
run: | | |
mv ./release/zips/AllMPMissions.zip ./release/zips/AllMPMissions_${{ env.SGD_VERSION }}.${{ env.BN_VERSION }}.zip | |
mv ./release/zips/OnlyTheMissionScripts.zip ./release/zips/OnlyTheMissionScripts_${{ env.SGD_VERSION }}.${{ env.BN_VERSION }}.zip | |
- name: create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ github.token }} | |
tag_name: release-${{ env.SGD_VERSION }}.${{ env.BN_VERSION }} | |
name: Release ${{ env.SGD_VERSION }}.${{ env.BN_VERSION }} | |
files: ./release/zips/*.zip | |
body_path: RELEASE.md |