Skip to content

actions

actions #13

Workflow file for this run

name: "Merge"
on:
push:
pull_request:
types: [closed]
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
any_changed: ${{ steps.changed-files.outputs.all_changed_files_count }}
# if: github.event.pull_request.mergedTODO
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get all changed *.dart, files in docs or pubspec.yaml
id: changed-files
uses: tj-actions/changed-files@v41
bump_and_tag:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: changes
if: needs.changes.outputs.any_changed != '0'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Setup Dart SDK
uses: dart-lang/[email protected]
- name: install cider
run: dart pub global activate cider
- name: Change flutter version tag
run: |
echo "FLUTTER_BUILD_VERSION=$(cider bump patch)" >> "$GITHUB_ENV"
- name: Update
id: update
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add -A
git commit --amend --no-edit
git push -f
echo "newSha=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Create tag
id: tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{env.FLUTTER_BUILD_VERSION}}
tag_prefix: ""
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{env.FLUTTER_BUILD_VERSION}}
excludeTypes: ""
includeInvalidCommits: true
- name: Push changelog
run: |
git add .
git commit --amend --no-edit
git push -f
- name: Release
uses: softprops/action-gh-release@v1
with:
body: "https://pub.dev/packages/zds_flutter/versions/${{env.FLUTTER_BUILD_VERSION}}"
tag_name: ${{env.FLUTTER_BUILD_VERSION}}