Merge remote-tracking branch 'origin/main' #30
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: 🚀 Publish New version | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
JAVA_VERSION: "18.x" | |
FLUTTER_VERSION: "3.13.0" | |
FLUTTER_CHANNEL: "stable" | |
jobs: | |
update_code_version: | |
name: 🚀 Publish New version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Extract version from tag | |
uses: damienaicheh/extract-version-from-tag-action@v1.1.0 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: ${{env.JAVA_VERSION}} | |
- name: 🔧 Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{inputs.flutter_version}} | |
channel: ${{inputs.flutter_channel}} | |
cache: true | |
- name: 🔖 Generating new version and change log | |
run: | | |
flutter pub global activate cider | |
cider version ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}+${{ env.NUMBER_OF_COMMITS }} | |
- name: Get changelog | |
- uses: actions/github@v4 | |
id: get-tag-description | |
with: | |
ref: ${{ github.ref }} | |
# Optionally specify the tag name if needed | |
tag_name: ${{ github.ref_name }} | |
- name: Print tag description | |
run: | | |
echo ${{ steps.get-tag-description.outputs.tag.message }} | |
cider log changed ${{ steps.get-tag-description.outputs.tag.message }} | |
cider release | |
- name: Commit & Push changes | |
uses: actions-js/push@master | |
with: | |
github_token: ${{ secrets.GITOKEN }} | |
- name: 🔐 Setup Pub Credentials | |
run: | | |
mkdir -p $HOME/.config/dart | |
cat <<EOF > $HOME/.config/dart/pub-credentials.json | |
{ | |
"accessToken": "${{ secrets.PUB_CREDS_ACCESS_TOKEN }}", | |
"refreshToken": "${{ secrets.PUB_CREDS_REFRESH_TOKEN }}", | |
"idToken": "${{ secrets.PUB_CREDS_ID_TOKEN }}", | |
"tokenEndpoint": "https://accounts.google.com/o/oauth2/token", | |
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ], | |
"expiration": ${{ secrets.PUB_CREDS_EXPIRATION }} | |
} |