-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix github actions * another script * permissions * use env-var instead * reposition keys * typo * v4.3.3pre * v4.3.3-20240801 * tag change * fix pipeline runs * remove broken job * update kotlin versions * update kotlin versions
- Loading branch information
Showing
11 changed files
with
66 additions
and
48 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ on: | |
# Triggers the workflow on push or pull request events but only for the develop branch | ||
push: | ||
branches: [release, hotfix] | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+*" | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
|
@@ -18,33 +20,39 @@ jobs: | |
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
permissions: | ||
id-token: write | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "stable" | ||
- uses: actions/checkout@v4 | ||
- uses: subosito/flutter-action@v2 | ||
- run: dart --version | ||
- run: flutter --version | ||
- name: Get Git Tag | ||
id: get_tag | ||
run: echo "TAG=$(git describe --tags)" >> $GITHUB_ENV | ||
- name: Edit pubspec.ymal for dev release | ||
run: | | ||
sed -i "s/version.*/&-$GITHUB_RUN_ID/" pubspec.yaml | ||
sed -i "s/version:.*/version: ${{ env.TAG }}/" pubspec.yaml | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/[email protected] | ||
- name: Edit changelog.md for dev release | ||
run: | | ||
sed -i "0,/\#\# \[.*/s//## [${{steps.changelog_reader.outputs.version}}-$GITHUB_RUN_ID]/" CHANGELOG.md | ||
sed -i "0,/\#\# \[.*/s//## [${{env.TAG}}]/" CHANGELOG.md | ||
cat CHANGELOG.md | ||
- name: Setup credentials | ||
run: | | ||
cat <<EOF > $PUB_CACHE/credentials.json | ||
${{ secrets.CREDENTIALS }} | ||
EOF | ||
- name: Publish package | ||
run: flutter pub publish --force | ||
- name: Add entry to Github release | ||
uses: softprops/action-gh-release@v1 | ||
# copied from https://github.com/dart-lang/setup-dart/issues/68#issuecomment-2251116730 | ||
- name: 🪪 Get Id Token | ||
uses: actions/github-script@v6 | ||
with: | ||
tag_name: ${{ steps.changelog_reader.outputs.version }}+${{ github.run_id }} | ||
prerelease: true | ||
script: | | ||
let pub_token = await core.getIDToken('https://pub.dev') | ||
core.exportVariable('PUB_TOKEN', pub_token) | ||
- name: 📦 Install dependencies | ||
run: flutter pub get | ||
- name: 🌵 Dry Run | ||
run: flutter pub publish --dry-run | ||
- name: 📢 Publish | ||
run: | | ||
flutter pub token add https://pub.dev --env-var PUB_TOKEN | ||
flutter pub publish -f |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ on: | |
# Triggers the workflow on push or pull request events but only for the develop branch | ||
push: | ||
branches: [master] | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
|
@@ -16,27 +18,35 @@ jobs: | |
release: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "stable" | ||
- uses: actions/checkout@v4 | ||
# copied from https://github.com/dart-lang/setup-dart/issues/68#issuecomment-2251116730 | ||
- uses: subosito/flutter-action@v2 | ||
- run: dart --version | ||
- run: flutter --version | ||
- name: Setup credentials | ||
- name: 🪪 Get Id Token | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
let pub_token = await core.getIDToken('https://pub.dev') | ||
core.exportVariable('PUB_TOKEN', pub_token) | ||
- name: 📦 Install dependencies | ||
run: flutter pub get | ||
- name: 🌵 Dry Run | ||
run: flutter pub publish --dry-run | ||
- name: 📢 Publish | ||
run: | | ||
cat <<EOF > $PUB_CACHE/credentials.json | ||
${{ secrets.CREDENTIALS }} | ||
EOF | ||
- name: Publish package | ||
run: flutter pub publish --force | ||
flutter pub token add https://pub.dev --env-var PUB_TOKEN | ||
flutter pub publish -f | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/[email protected] | ||
- name: Add entry to Github release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.changelog_reader.outputs.version }} | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
body: ${{ steps.changelog_reader.outputs.changes }} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
buildscript { | ||
ext.kotlin_version = '1.6.0' | ||
ext.kotlin_version = '1.7.10' | ||
repositories { | ||
google() | ||
mavenCentral() | ||
|
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
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
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
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
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
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