Release Flutter SDK #21
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: Release Flutter SDK | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: "Git Tag, Branch or SHA to build" | |
required: true | |
default: "main" | |
earlyaccess: | |
description: "Is this a early access build?" | |
default: true | |
type: boolean | |
version: | |
description: "Version number (no 'v' prefix)" | |
required: true | |
secrets: | |
BUILD_USER_PAT: | |
required: true | |
jobs: | |
build: | |
name: Generate Flutter SDK release | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
contents: write | |
id-token: write | |
steps: | |
- name: Setup Flutter SDK | |
uses: flutter-actions/setup-flutter@v2 | |
with: | |
channel: stable | |
version: 3.3.5 | |
# clone the repo at a specific | |
- name: Checkout ${{ inputs.ref }} | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ inputs.ref }} | |
# human error checks | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.10" | |
- name: Install Pyyaml | |
run: | | |
pip install pyyaml | |
- name: Release Preflight Checks | |
run: | | |
python build-utils/preflight.py | |
env: | |
NAMI_SDK_VERSION: ${{ inputs.version }} | |
- name: Write credentials | |
run: | | |
mkdir ~/.config/dart/ | |
echo $PUB_DEV_CREDENTIAL_JSON >> ~/.config/dart/pub-credentials.json | |
env: | |
PUB_DEV_CREDENTIAL_JSON: ${{ secrets.PUB_DEV_CREDENTIAL_JSON }} | |
- name: Publish | |
run: | | |
cd sdk | |
dart pub publish -f | |
- name: Create Github Release | |
run: |- | |
sh gh-release-command.sh | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |