Skip to content

Commit 049b10f

Browse files
authored
ci: Fix auto-release (#1076)
1 parent 9a57456 commit 049b10f

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

.github/workflows/release-automated.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,14 @@ jobs:
3838
- name: Install dependencies
3939
run: npm ci
4040
- name: Run semantic-release for dart package
41-
run: |
42-
npx semantic-release || EXIT_CODE=$?
43-
if [ ${EXIT_CODE:-0} -ne 0 ] && [ ${EXIT_CODE:-0} -ne 69 ]; then
44-
exit $EXIT_CODE
45-
fi
41+
working-directory: packages/dart
42+
run: npx semantic-release
4643
env:
4744
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
4845
PKG_NAME: dart
4946
- name: Run semantic-release for flutter package
50-
run: |
51-
npx semantic-release || EXIT_CODE=$?
52-
if [ ${EXIT_CODE:-0} -ne 0 ] && [ ${EXIT_CODE:-0} -ne 69 ]; then
53-
exit $EXIT_CODE
54-
fi
47+
working-directory: packages/flutter
48+
run: npx semantic-release
5549
env:
5650
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
5751
PKG_NAME: flutter

packages/dart/.releaserc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../../release.config.js');

packages/flutter/.releaserc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../../release.config.js');

release.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ async function config() {
5757
];
5858

5959
const config = {
60+
extends: 'semantic-release-monorepo',
6061
branches: [
6162
'master',
6263
// { name: 'alpha', prerelease: true },
@@ -83,11 +84,6 @@ async function config() {
8384
noteKeywords: [ 'BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING' ],
8485
},
8586
}],
86-
['@semantic-release/exec', {
87-
verifyConditionsCmd: packageName !== 'root'
88-
? `bash -c 'LAST_TAG=$(git describe --tags --abbrev=0 --match="${packageName}-*" 2>/dev/null || echo ""); if [ -n "$LAST_TAG" ]; then git diff --name-only $LAST_TAG HEAD | grep -q "^packages/${packageName}/"; else git log --all --name-only --pretty=format: | grep -q "^packages/${packageName}/"; fi || (echo "No changes in packages/${packageName}, skipping release" && exit 69)'`
89-
: 'echo "Root package always runs"',
90-
}],
9187
['@semantic-release/release-notes-generator', {
9288
preset: 'angular',
9389
parserOpts: {

0 commit comments

Comments
 (0)