Skip to content

Merge pull request #2 from nwithan8/dart3 #6

Merge pull request #2 from nwithan8/dart3

Merge pull request #2 from nwithan8/dart3 #6

Workflow file for this run

name: Publish package
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
jobs:
# Publish package to pub.dev
publish:
name: 'Publish to pub.dev'
permissions:
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
steps:
# Checkout repository
- uses: actions/checkout@v3
# Setup Dart SDK with JWT token
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
# Update version number
- name: Update version number
uses: jacobtomlinson/[email protected]
with:
find: "VERSIONADDEDBYGITHUB"
replace: "${{ github.event.inputs.version || github.ref_name }}"
regex: false
# Minimal package setup
- name: Install dependencies
run: dart pub get
working-directory: ${{ inputs.working-directory }}
# Dry run checks
- name: Publish - dry run
run: dart pub publish --dry-run
working-directory: ${{ inputs.working-directory }}
# Publish
- name: Publish to pub.dev
run: dart pub publish -f
working-directory: ${{ inputs.working-directory }}