-
Notifications
You must be signed in to change notification settings - Fork 142
36 lines (32 loc) · 1.11 KB
/
release_unreleased_prs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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