Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version from pubspec #1013

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/dev-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ jobs:
if: matrix.target == 'iOS'
run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd ios
pod update
flutter clean
Expand All @@ -200,9 +199,7 @@ jobs:
exit 1

# Get dependencies and decrypt needed files.
- run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
- run: flutter pub get

- name: Decrypt SignETS certificate and Google Services files
run: |
Expand Down
51 changes: 16 additions & 35 deletions .github/workflows/master-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,6 @@ env:
APP_NAME: 'notre_dame'

jobs:
##############################################################
# Setup
##############################################################
tag_validation:
name: Tag validation
runs-on: ubuntu-latest
outputs:
version: ${{ steps.split.outputs._0 }}
steps:
- uses: actions/checkout@v4
- name: Get the version from the pubspec
id: pubspecVersion
uses: CumulusDS/get-yaml-paths-action@v1.0.2
with:
file: pubspec.yaml
version: version
- uses: winterjung/split@v2.1.0
id: split
with:
msg: ${{ steps.pubspecVersion.outputs.version }}
separator: '+'
- name: Validate that version doesn't exists
uses: mukunku/tag-exists-action@v1.6.0
id: checkTag
with:
tag: ${{ steps.split.outputs._0 }}
- if: ${{ steps.checkTag.outputs.exists == 'true' }}
name: Post comment on PR and fail.
run: |
echo '${{ steps.split.outputs._0 }} already exists, please update the pubspec version.'
exit 1

##############################################################
# Tests
##############################################################
Expand Down Expand Up @@ -167,6 +135,21 @@ jobs:
flutter-version: '3.19.x'
channel: 'stable'
cache: true
# - uses: actions-ecosystem/action-release-label@v1.2.0
# id: release-label
# if: ${{ github.event.pull_request.merged == true }}
# - uses: actions-ecosystem/action-get-latest-tag@v1.6.0
# id: get-latest-tag
# if: ${{ steps.release-label.outputs.level != null }}
# - uses: actions-ecosystem/action-bump-semver@v1.0.0
# id: bump-semver
# if: ${{ steps.release-label.outputs.level != null }}
# with:
# current_version: ${{ steps.get-latest-tag.outputs.tag }}
# level: ${{ steps.release-label.outputs.level }}
# - name: Set pubspec version
# if: ${{ steps.bump-semver.outputs.level != null }}
# run: sed -i "s/version: .*/version: ${{ steps.bump-semver.outputs.new_version }}/g" pubspec.yaml
- name: Install Android dependencies
if: matrix.target == 'Android'
uses: actions/setup-java@v4
Expand All @@ -178,15 +161,13 @@ jobs:
if: matrix.target == 'iOS'
run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd ios
pod install
flutter clean

# Get dependencies and decrypt needed files.
- run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs

- name: Decrypt SignETS certificate and Google Services files
run: |
Expand Down Expand Up @@ -226,7 +207,6 @@ jobs:
create_pre_release:
name: Create Github release
needs:
- tag_validation
- build
runs-on: ubuntu-latest
outputs:
Expand All @@ -245,6 +225,7 @@ jobs:
with:
path: build
- name: Create pre-release
if: ${{ github.event.pull_request.merged == true }}
run: |
gh release create ${{ needs.tag_validation.outputs.version }} */** --title v${{ needs.tag_validation.outputs.version }} -R '${{ github.repository }}' --prerelease --generate-notes
working-directory: build
26 changes: 26 additions & 0 deletions .github/workflows/test-version-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test Version workflow
on:
workflow_dispatch:
pull_request:

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-release-label@v1.2.0
id: release-label
with:
label_prefix: "version: "
- run: echo "Output level ${{ steps.release-label.outputs.level }}"
# - uses: actions-ecosystem/action-get-latest-tag@v1.6.0
# id: get-latest-tag
# if: ${{ steps.release-label.outputs.level != null }}
# - uses: actions-ecosystem/action-bump-semver@v1.0.0
# id: bump-semver
# if: ${{ steps.get-latest-tag.outputs.level != null }}
# with:
# current_version: ${{ steps.get-latest-tag.outputs.tag }}
# level: ${{ steps.release-label.outputs.level }}
# - name: Set pubspec version
# if: ${{ steps.bump-semver.outputs.level != null }}
# run: echo ${{ steps.bump-semver.outputs.new_version }}
44 changes: 0 additions & 44 deletions .github/workflows/versionning-workflow.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: The 4th generation of ÉTSMobile, the main gateway between the Éco
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 4.46.0+1
version: 0.0.0

environment:
sdk: '>=3.3.0 <4.0.0'
Expand Down
Loading