Release unreleased PRs #39
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: Release unreleased PRs | |
# Runs when a PR merges. | |
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-when-a-pull-request-merges | |
on: | |
workflow_dispatch: | |
# Comment out for now and just use manual kickoff of the action | |
# until we can figure our permissions | |
# pull_request: | |
# types: | |
# - closed | |
jobs: | |
release: | |
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
container: dart | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
ref: master | |
- name: Release | |
run: | | |
git config --global user.name ${{ secrets.USER_NAME }} | |
git config --global user.email ${{ secrets.USER_EMAIL }} | |
export PATH="$PATH":"$HOME/.pub-cache/bin" | |
export GITHUB_TOKEN=${{secrets.MACHINE_GITHUB_API_TOKEN}} | |
export MACHINE_GITHUB_API_TOKEN=${{secrets.MACHINE_GITHUB_API_TOKEN}} | |
dart pub get | |
dart tool/release_unreleased_prs.dart |