Release 1.2.0 #3
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
# DO NOT RUN THIS MANUALLY - THIS GETS RUN AS PART OF A DIFFERENT GH ACTIONS SCRIPT | |
name: Publish Release to Pub.dev | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+*' | |
env: | |
FLUTTER_VERSION: 3.16.1 | |
jobs: | |
Release-It-To-The-People: | |
runs-on: macos-13 | |
environment: live_pub_dev | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: "Test Release Check" | |
id: test-release-check | |
run: | | |
if [[ ${{ github.repository_owner }} == *"ololabs-playground"* ]] | |
then | |
echo "is-test=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "is-test=false" >> "$GITHUB_OUTPUT" | |
fi | |
- name: "Checkout Project" | |
uses: actions/checkout@v3 | |
- name: Setup Flutter | |
uses: flutter-actions/[email protected] | |
with: | |
channel: stable | |
version: ${{ env.FLUTTER_VERSION }} | |
- name: "Install Flutter Dependencies" | |
run: | | |
flutter pub get | |
- name: "Publish Dry Run" | |
if: ${{ steps.test-release-check.outputs.is-test == 'true' }} | |
run: | | |
dart pub publish --dry-run | |
- name: "Pub.dev Token Authentication" | |
if: ${{ steps.test-release-check.outputs.is-test == 'false' }} | |
uses: dart-lang/setup-dart@v1 | |
- name: "Publish Release" | |
if: ${{ steps.test-release-check.outputs.is-test == 'false' }} | |
run: dart pub publish --force | |