Nightly #44
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
name: Nightly | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 19 * * *' | |
permissions: | |
contents: write | |
env: | |
GIT_USER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' | |
GIT_USER_NAME: 'github-actions[bot]' | |
jobs: | |
bump-version: | |
name: Bump version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
${{ env.FLUTTER_HOME }}/.pub-cache | |
**/.packages | |
**/.flutter-plugins | |
**/.flutter-plugin-dependencies | |
**/.dart_tool/package_config.json | |
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: | | |
build-pubspec- | |
- run: flutter pub get | |
- name: Bump up version | |
run: echo "VERSION=$(dart run cider bump build)" >> $GITHUB_ENV | |
- run: | | |
git config --local user.name $GIT_USER_NAME | |
git config --local user.email $GIT_USER_EMAIL | |
- name: Commit and push pubspec.yaml | |
run: | | |
git add -u pubspec.yaml | |
echo "Bumped version number to $VERSION" | git commit --file=- | |
git push | |
- name: Generate a token | |
id: generate_token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
run: gh release create v$VERSION --generate-notes --prerelease |