-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from kushalmahapatro/release/v0.1.2
Release/v0.1.2
- Loading branch information
Showing
18 changed files
with
598 additions
and
114 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
bug: hotfix/* | ||
documentation: docs/* | ||
feature: ['feature/*', 'feat/*'] | ||
fix: fix/* | ||
chore: chore/* | ||
path: path/* | ||
build: build/* |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
categories: | ||
- title: 'Enhancements' | ||
labels: | ||
- 'enhancement' | ||
- title: 'Fixes' | ||
labels: | ||
- 'bug' | ||
- 'security' | ||
change-template: '* $TITLE — #$NUMBER' | ||
template: $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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Check Version | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
TRIGGER_NEXT_ACTION: | ||
required: true | ||
description: 'Trigger Next Action' | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get version | ||
id: yq | ||
uses: mikefarah/yq@master | ||
|
||
with: | ||
cmd: yq -r '.version' 'pubspec.yaml' | ||
|
||
- name: Print version | ||
run: echo ${{ steps.yq.outputs.result }} | ||
|
||
- name: Get Latest Tag | ||
id: get_tag | ||
run: | | ||
REPO_NAME=${{ github.repository }} | ||
LATEST_TAG=$(curl -s "https://api.github.com/repos/$REPO_NAME/releases" | jq -r '.[0].tag_name') | ||
echo "latest=${LATEST_TAG}">> $GITHUB_OUTPUT | ||
- name: Print version | ||
run: echo "provided_version=${{ steps.yq.outputs.result }} and latest_tag=${{ steps.get_tag.outputs.latest }}" | ||
|
||
- name: Check Version | ||
id: check_version | ||
run: | | ||
latest_tag=${{ steps.get_tag.outputs.latest }} | ||
provided_tag=${{ steps.yq.outputs.result }} | ||
# Extract numerical version parts from the tags | ||
latest_version=$(echo "$latest_tag" | sed 's/v\?\([0-9.]*\)[-a-zA-Z]*$/\1/') | ||
provided_version=$(echo "$provided_tag" | sed 's/v\?\([0-9.]*\)[-a-zA-Z]*$/\1/') | ||
echo "latest_version=${latest_version} and provided_version=${provided_version}" | ||
echo "$provided_version" == "$latest_version" | ||
if [[ "$provided_version" == "$latest_version" ]]; then | ||
echo "Provided version is equal to latest version" | ||
echo "trigger_next_action=false">> $GITHUB_OUTPUT | ||
exit 1 | ||
elif [[ "$provided_version" < "$latest_version" ]]; then | ||
echo "Provided version is less than latest version" | ||
echo "trigger_next_action=false">> $GITHUB_OUTPUT | ||
exit 1 | ||
else | ||
echo "trigger_next_action=true">> $GITHUB_OUTPUT | ||
fi | ||
- name: Trigger Next Action | ||
run: | | ||
echo "Trigger Next Action ${{ steps.check_version.outputs.trigger_next_action }}" | ||
echo "set-env:TRIGGER_NEXT_ACTION=${{ steps.check_version.outputs.trigger_next_action}}" >> $GITHUB_ENV | ||
env: | ||
TRIGGER_NEXT_ACTION: ${{ steps.check_version.outputs.trigger_next_action }} |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Commit Push | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
env: | ||
flutter_version: "3.13.0" | ||
java_version: "12.x" | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
discussions: write | ||
|
||
jobs: | ||
|
||
check-branch: | ||
runs-on: ubuntu-latest | ||
name: Check branch | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache Flutter SDK | ||
uses: actions/cache@v3 | ||
with: | ||
path: /opt/hostedtoolcache/flutter | ||
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }} | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ env.flutter_version }} | ||
- run: flutter --version | ||
|
||
- name: Install dependencies | ||
run: flutter pub get | ||
|
||
- name: Analyze project source | ||
run: flutter analyze | ||
|
||
- name: Run tests | ||
run: flutter test | ||
|
||
- name: Run dart publish (dry run) | ||
if: ${{ github.event.pull_request.base.ref == 'main' }} | ||
run: flutter pub publish --dry-run |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Create Tag and Publish to pub.dev | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Trigger Create Tag and Publish Workflow on PR Merge"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
placeholder-job: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Placeholder Step | ||
run: echo "This is a placeholder job" | ||
|
||
create-tag-and-publish: | ||
permissions: | ||
repository-projects: write | ||
packages: write | ||
contents: read | ||
pull-requests: write | ||
|
||
runs-on: ubuntu-latest | ||
needs: [placeholder-job] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get version | ||
id: yq | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq -r '.version' 'pubspec.yaml' | ||
|
||
- name: Print version | ||
run: echo ${{ steps.yq.outputs.result }} | ||
|
||
- name: Create tag | ||
uses: actions/github-script@v3 | ||
id: tagCreate | ||
env: | ||
TAG: 'v${{ steps.yq.outputs.result }}' | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: "refs/tags/v${{ steps.yq.outputs.result }}", | ||
sha: context.sha | ||
}) | ||
- name: Print tag update | ||
run: echo ${{ steps.tagCreate.outputs.result }} | ||
|
||
- name: Publish | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
|
||
- name: Flutter Version | ||
run: flutter --version | ||
|
||
- name: Publish to Dart Package | ||
uses: k-paxian/[email protected] | ||
with: | ||
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | ||
flutter: true | ||
skipTests: true |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# .github/workflows/publish.yml | ||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v' | ||
|
||
# Publish using custom workflow | ||
jobs: | ||
publish: | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
- run: flutter --version | ||
|
||
- name: Install dependencies | ||
run: flutter pub get | ||
|
||
- name: Analyze project source | ||
run: flutter analyze | ||
|
||
- name: Run tests | ||
run: flutter test | ||
|
||
- name: Run dart publish (dry run) | ||
run: flutter pub publish --dry-run | ||
|
||
- name: Publish | ||
uses: k-paxian/[email protected] | ||
with: | ||
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | ||
flutter: true | ||
skipTests: true |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, edited, reopened ] | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
discussions: write | ||
|
||
jobs: | ||
assign_author: | ||
name: Assign Author to the Pull Request | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Assign Author to the Pull Request | ||
uses: technote-space/assign-author@6252488282b99652aef47451a353eb88aea24666 | ||
|
||
pr-labeler: | ||
name: Label the PR based on the branch | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Label the Pull Request | ||
uses: TimonVS/pr-labeler-action@bd0b592a410983316a454e3d48444608f028ec8e | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
Oops, something went wrong.