Bump version to 6.0.0-alpha.7 #24
Workflow file for this 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
name: Deploy | |
on: | |
push: | |
tags: '*' | |
jobs: | |
release-assets: | |
name: Release Assets | |
runs-on: macOS-12 | |
env: | |
EXECUTABLE_NAME: buildconfigswift | |
EXECUTABLE_VERSION: ${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache SPM build directory | |
uses: actions/cache@v3 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.swift') }} | |
restore-keys: | | |
${{ runner.os }}-spm-${{ env.cache-name }}- | |
${{ runner.os }}-spm- | |
${{ runner.os }}- | |
- id: set-xcode-version | |
run: | | |
xcode_version=$(cat .github/matrix.json | jq -rc '.xcode_version | max') | |
echo "xcode-version=$xcode_version" >> $GITHUB_OUTPUT | |
- name: Build and zip | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ steps.set-xcode-version.outputs.xcode-version }}.app/Contents/Developer | |
run: | | |
set -e | |
swift build -c release -Xswiftc -suppress-warnings | |
.build/release/${EXECUTABLE_NAME} --version | |
zip -j .build/${EXECUTABLE_NAME}-v${EXECUTABLE_VERSION}.zip .build/release/${EXECUTABLE_NAME} LICENSE | |
- name: Create release | |
if: success() && startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ github.ref_name }} | |
files: .build/${{ env.EXECUTABLE_NAME }}-v${{ env.EXECUTABLE_VERSION }}.zip | |
draft: false | |
podspec: | |
name: Podspec | |
needs: release-assets | |
runs-on: macOS-12 | |
env: | |
POD_VERSION: ${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Lint | |
run: pod spec lint | |
- name: Deploy | |
if: success() && startsWith(github.ref, 'refs/tags/') | |
env: | |
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | |
run: pod trunk push BuildConfig.swift.podspec | |
# revert-to-develop-mode: | |
# name: Revert to develop mode | |
# needs: podspec | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# ref: main | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Revert to develop mode | |
# run: | | |
# if [[ "$(cat Package.swift | grep "let isDevelop =" | awk '{ print $NF }')" == 'false' ]]; then | |
# git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
# git config --global user.name "github-actions[bot]" | |
# sed -i -e 's/let isDevelop = false/let isDevelop = true/g' Package.swift | |
# git commit -m "Revert to develop mode" Package.swift | |
# git push origin main | |
# fi |