back to 2.4.0 #15
This file contains hidden or 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: CD | |
| on: | |
| push: | |
| branches: master | |
| env: | |
| BUILD_OUTPUT: 'build/Build/Products/Debug' | |
| permissions: write-all | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: '5' | |
| - name: Manage Version | |
| run: | | |
| git fetch --prune --unshallow --tags | |
| GIT_SHA="$(git rev-parse --short HEAD)" | |
| CUR_TAG="$(git tag -l | grep 'alpha\|beta' | tail -1)" | |
| eval $(grep -m 1 "MODULE_VERSION =" itlwm.xcodeproj/project.pbxproj | tr -d ';' | tr -d '\t' | tr -d " ") | |
| echo "SHORT_SHA=$GIT_SHA" >> $GITHUB_ENV | |
| echo "ITLWM_VER=$MODULE_VERSION" >> $GITHUB_ENV | |
| if [[ -z $CUR_TAG ]]; then | |
| echo "OLD_PRE_TAG=NULL" >> $GITHUB_ENV | |
| else | |
| echo "OLD_PRE_TAG=$CUR_TAG" >> $GITHUB_ENV | |
| fi | |
| - name: Install MacKernelSDK | |
| run: | | |
| git clone --depth=1 https://github.com/acidanthera/MacKernelSDK.git | |
| - name: Build itlwm | |
| run: | | |
| xcodebuild -scheme itlwm -configuration Debug -derivedDataPath build GIT_COMMIT=_${SHORT_SHA} | xcpretty && exit ${PIPESTATUS[0]} | |
| - name: Build AirportItlwm | |
| run: | | |
| xcodebuild -scheme "AirportItlwm (all)" -configuration Debug -derivedDataPath build GIT_COMMIT=_${SHORT_SHA} | xcpretty && exit ${PIPESTATUS[0]} | |
| - name: Pack Artifacts | |
| run: | | |
| cd $BUILD_OUTPUT | |
| zip -r itlwm-v${ITLWM_VER}-DEBUG-alpha-${SHORT_SHA}.zip itlwm.kext | |
| while read -r tgt ; do | |
| zip -r AirportItlwm-${tgt// /_}-v${ITLWM_VER}-DEBUG-alpha-${SHORT_SHA}.zip "$tgt" | |
| done < <(find . -mindepth 1 -maxdepth 1 -type d -not -path "*.kext" | cut -c 3-) | |
| cd - | |
| - name: Create Release on Push | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| prerelease: true | |
| bodyFile: ReleaseNotes.md | |
| files: "${{ env.BUILD_OUTPUT }}/*.zip" | |
| tag_name: 2.4.1 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |