-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (50 loc) · 1.74 KB
/
publish.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish to pub.dev
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
jobs:
# This job is based on dart-lang/setup-dart/.github/workflows/publish.yml@v1, which cannot be used here as it only
# supports publishing pure Dart packages and not Flutter packages.
publish:
name: Publish to pub.dev
environment: pub.dev
permissions:
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-dependencies
# Setup Dart SDK with JWT token. This is needed to allow publishing to pub.dev from the CI without having to
# manually log-in in to pub.dev with an admin account.
- uses: dart-lang/[email protected]
- name: Publish dry run
run: dart pub publish --dry-run
- name: Publish to pub.dev
run: dart pub publish -f
create_gh_release:
name: Create GitHub release
needs: [publish]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract Changelog
id: changelog
uses: ffurrer2/extract-release-notes@v1
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.changelog.outputs.release_notes }}
publish_documentation:
needs: [publish]
name: Generate API Documentation
uses: ./.github/workflows/generate-documentation.yml
with:
version_number: ${{ github.ref_name }}
secrets:
PLAYER_CI_GH_TOKEN: ${{ secrets.PLAYER_CI_GH_TOKEN }}
GCS_ACCOUNT: ${{ secrets.GCS_ACCOUNT }}
CF_TOKEN: ${{ secrets.CF_TOKEN }}
CF_ZONEID: ${{ secrets.CF_ZONEID }}