Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update deployment action #303

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,53 @@
name: Deployment
on:
on:
push:
tags:
- patch
- minor
- major
tags:
- patch
- minor
- major
workflow_dispatch:
inputs:
release:
type: choice
description: Deploy new package release
options:
- patch
- minor
- major

jobs:
deploy:
runs-on: macos-12
runs-on: macos-latest
env:
GITHUB_ACTION: ${{ github.action_path }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: '1.17'
go-version: "1.17"
- name: Set release type environment
run: |
echo "RELEASE_TYPE=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

if [[ "$RELEASE_TYPE" != "patch" && "$RELEASE_TYPE" != "minor" && "$RELEASE_TYPE" != "major" ]]; then
echo "RELEASE_TYPE=${{ github.event.inputs.release }}" >> $GITHUB_ENV
fi
- name: Check out polyglot
uses: actions/checkout@v2
with:
repository: algolia/polyglot
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_14.2.app/Contents/Developer'
- name: Install polyglot
run: |
make install
export PATH="$GOPATH/bin:$PATH"
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.2'
bundler-cache: true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: maierj/fastlane-action@v2.2.1
- uses: ruby/setup-ruby@v1
with:
lane: 'deploy'
verbose: 'true'
options: '{ "type": "${{ env.RELEASE_TYPE }}" }'
ruby-version: "2.7.2"
bundler-cache: true
- name: Deploy library release
run: bundle exec fastlane deploy verbose:true type:${{ env.RELEASE_TYPE }} no_dry_run:true
Loading