amap_map/.github/workflows/publish.yml

47 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2023-12-26 13:30:24 +08:00
name: Publish to Pub.dev
on:
2023-12-26 14:03:40 +08:00
push
2023-12-26 13:30:24 +08:00
jobs:
publishing:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@main # required!
- name: '>> Dart package <<'
id: package_publisher
2023-12-26 13:30:24 +08:00
uses: k-paxian/dart-package-publisher@master
with:
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
2023-12-26 14:03:40 +08:00
skipTests: true
flutter: true
2023-12-26 14:38:45 +08:00
force: true
2024-08-24 11:40:00 +08:00
- name: Get Commit Logs
id: git_log
run: |
2024-08-25 22:49:30 +08:00
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -z "$TAG" ]; then
GIT_LOG=$(git log --pretty=format:'- %s')
else
GIT_LOG=$(git log --pretty=format:'- %s' $TAG..HEAD)
fi
2024-08-24 11:40:00 +08:00
echo "git_log=$GIT_LOG" >> $GITHUB_ENV
- name: Create Release
if: steps.package_publisher.outputs.success == 'true'
uses: kuloud/Github-Release-Action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.package_publisher.outputs.localVersion }}
title: Release ${{ steps.package_publisher.outputs.localVersion }}
body: |
2024-08-26 09:55:49 +08:00
Automated release for version ${{ steps.package_publisher.outputs.localVersion }}\n
Changes in this release:\n
2024-08-24 11:40:00 +08:00
${{ env.git_log }}
draft: false
prerelease: false