Skip to content

Release 4.4.0 (#42) #27

Release 4.4.0 (#42)

Release 4.4.0 (#42) #27

Workflow file for this run

name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
jobs:
deploy:
runs-on: macos-15-xlarge
timeout-minutes: 20
env:
DEVELOPER_DIR: /Applications/Xcode_16.1.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.1'
- name: Install CocoaPods and xcpretty
run: |
gem install cocoapods -v '1.16.1'
gem install xcpretty
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_16.1.app/Contents/Developer'
- name: Checkout repository
uses: actions/checkout@v4
- name: Check Version
run: bash ./scripts/check_version.sh ${GITHUB_REF/refs\/tags\//}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Get the release notes
id: get_release_notes
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
NOTES="$(awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md)"
NOTES="${NOTES//'%'/%25}"
NOTES="${NOTES//$'\n'/%0A}"
NOTES="${NOTES//$'\r'/%0D}"
echo ::set-output name=NOTES::"$NOTES"
- uses: actions/setup-node@master
with:
node-version: 21
registry-url: https://registry.npmjs.org/
- name: Verify
run: |
set -eo pipefail
npm ci --no-save --registry=https://registry.npmjs.org/
npm run verify | xcpretty --color
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Github Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.get_release_notes.outputs.NOTES }}
draft: false
prerelease: false
- name: Publish Docs
run: npm publish --access public
- name: Setup GCP Auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Upload Docs
run: bash ./scripts/upload_docs.sh ${GITHUB_REF/refs\/tags\//} ./docs