Skip to content

Commit

Permalink
ci: fix semantic-release withour github-action with strict version
Browse files Browse the repository at this point in the history
  • Loading branch information
goshander committed Oct 30, 2023
1 parent 7723f8c commit 190f482
Show file tree
Hide file tree
Showing 5 changed files with 9,975 additions and 41 deletions.
53 changes: 27 additions & 26 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: read

env:
flutter_version: '3.10.x'
flutter_version: "3.10.x"

jobs:
calc-release-version:
Expand All @@ -25,11 +25,12 @@ jobs:
- name: override releaserc config
run: cat .releaserc-pubspec > .releaserc
- name: calculate release version
uses: cycjimmy/semantic-release-action@v3
uses: actions/setup-node@v3
with:
extra_plugins: |
@64mb/semantic-release-flutter-plugin
conventional-changelog
node-version: 18
cache: "npm"
- run: npm ci
- run: npx semantic-release
env:
# only for read
GITHUB_TOKEN: ${{ secrets.CI_RELEASE_TOKEN }}
Expand Down Expand Up @@ -57,11 +58,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
channel: "stable"
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path

cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- name: apt install build deps
uses: awalsh128/cache-apt-pkgs-action@latest
with:
Expand Down Expand Up @@ -96,10 +96,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
channel: "stable"
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- name: flutter enable windows desktop target
run: flutter config --enable-windows-desktop
- name: flutter build windows
Expand Down Expand Up @@ -132,10 +132,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
channel: "stable"
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- name: flutter enable macos desktop target
run: flutter config --enable-macos-desktop
- name: flutter build macos
Expand All @@ -162,10 +162,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
channel: "stable"
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- name: flutter build android
run: flutter build apk --no-tree-shake-icons
- name: move build android
Expand All @@ -190,10 +190,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
channel: "stable"
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- name: flutter build web
run: flutter build web --no-tree-shake-icons
- name: upload to s3
Expand All @@ -205,7 +205,7 @@ jobs:
aws_bucket: ${{ secrets.S3_BUCKET }}
endpoint: ${{ vars.S3_ENDPOINT }}
source_dir: build/web
destination_dir: ''
destination_dir: ""
github-release:
name: github-release
runs-on: ubuntu-latest
Expand Down Expand Up @@ -247,11 +247,12 @@ jobs:
with:
name: android-x64
- name: release
uses: cycjimmy/semantic-release-action@v3
uses: actions/setup-node@v3
with:
extra_plugins: |
@64mb/semantic-release-flutter-plugin
conventional-changelog
node-version: 18
cache: "npm"
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.CI_RELEASE_TOKEN }}
GIT_AUTHOR_NAME: 64mb-robot
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ migrate_working_dir/
/build/
/dist/

# node
node_modules

# ci
/coverage/
test.json
Expand Down
Loading

0 comments on commit 190f482

Please sign in to comment.