Skip to content

Commit

Permalink
chore: Update publish workflow to include explicit tag and publish step
Browse files Browse the repository at this point in the history
  • Loading branch information
ishafiul committed Dec 28, 2023
1 parent fc3d9e0 commit 8bf3d19
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 🚀 Publish New version
on:
push:
tags:
- "*"
- "0.0.0"

env:
JAVA_VERSION: "18.x"
Expand Down Expand Up @@ -62,4 +62,6 @@ jobs:
"tokenEndpoint": "https://accounts.google.com/o/oauth2/token",
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
"expiration": ${{ secrets.PUB_CREDS_EXPIRATION }}
}
}
- name: 📢 Publish
run: flutter pub publish -f
47 changes: 47 additions & 0 deletions .github/workflows/create_release2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 🚀 Publish New version
on:
push:
branches:
- main

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/[email protected]
- 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
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITOKEN }}
exclude_types: other,doc,chore

- name: Print tag description
run: |
echo ${{ steps.changelog.outputs.changes }}
cider log changed "${{ steps.changelog.outputs.changes }}"

0 comments on commit 8bf3d19

Please sign in to comment.