-
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1.01 KB
/
publish.yaml
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
37
38
39
name: Release
on:
push:
branches:
- main
concurrency:
group: "publish"
cancel-in-progress: true
jobs:
publish:
if: |
startsWith(github.event.head_commit.message, 'release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Set dart credentials
run: |
mkdir "$XDG_CONFIG_HOME/dart"
echo '${{ secrets.PUB_CREDENTIALS }}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
- name: Prepare git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Activate melos
run: dart pub global activate melos
- name: Publish package
run: melos publish --no-dry-run --git-tag-version --yes
- name: Create tags
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
tags: true
branch: main