Release v1.0.0+2_generator #9
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Publish package to pub.dev | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Current Release | |
id: current_release | |
uses: joutvhu/get-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Dart SDK | |
uses: dart-lang/setup-dart@v1 | |
- name: Setup Credentials | |
uses: joutvhu/write-file@v1 | |
with: | |
path: ~/.config/dart/pub-credentials.json | |
contents: ${{ secrets.PUB_CREDENTIALS }} | |
write_mode: overwrite | |
- name: Install dependencies for dioxide | |
if: ${{ endsWith(steps.current_release.outputs.tag_name, '_dioxide') || !contains(steps.current_release.outputs.tag_name, '_') }} | |
run: dart pub get | |
- name: Publish package for dioxide | |
if: ${{ endsWith(steps.current_release.outputs.tag_name, '_dioxide') || !contains(steps.current_release.outputs.tag_name, '_') }} | |
run: dart pub publish -f | |
- name: Copy README file to generator | |
if: ${{ endsWith(steps.current_release.outputs.tag_name, '_generator') || !contains(steps.current_release.outputs.tag_name, '_') }} | |
run: cp -r ./README.md ./generator/ | |
- name: Install dependencies for generator | |
if: ${{ endsWith(steps.current_release.outputs.tag_name, '_generator') || !contains(steps.current_release.outputs.tag_name, '_') }} | |
run: dart pub get | |
working-directory: generator | |
- name: Publish package for generator | |
if: ${{ endsWith(steps.current_release.outputs.tag_name, '_generator') || !contains(steps.current_release.outputs.tag_name, '_') }} | |
run: dart pub publish -f | |
working-directory: generator |