Skip to content

Commit 472c464

Browse files
committed
test autotagger
1 parent 4e1a4a5 commit 472c464

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

.github/workflows/publish-packages.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,19 @@ jobs:
1717
node-version: 18.13.0
1818
registry-url: https://registry.npmjs.org/
1919
- run: npm ci
20-
- run: npm run publishPackages
20+
- run: TAGS=$(node ./scripts/publishPackages)
21+
- run: echo "$TAGS"
2122
env:
2223
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2324
- uses: EndBug/add-and-commit@v9
2425
with:
2526
author_name: Dataport Geo Bot
2627
author_email: [email protected]
28+
- run: |
29+
git config user.name "Dataport Geo Bot"
30+
git config user.email "[email protected]"
31+
for TAG_NAME in $TAGS; do
32+
git tag $TAG_NAME
33+
git push origin $TAG_NAME
34+
echo "Released and tagged: $TAG_NAME"
35+
done

.hack.sh.swp

12 KB
Binary file not shown.

packages/lib/createTestMountParameters/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANGELOG
22

3+
## 1.3.0-mock-release-for-testing-pipeline.0
4+
35
## 1.2.0
46

57
- Feature: Extend mock state to match current core state type.

scripts/publishPackages.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const cp = require('child_process')
66
const fs = require('fs')
77
const packages = require('./packages')
88

9+
const tags = []
10+
911
function checkForNewVersion(cwd) {
1012
const { version } = JSON.parse(
1113
fs.readFileSync(cwd + '/package.json', { encoding: 'UTF-8' })
@@ -18,6 +20,13 @@ function checkForNewVersion(cwd) {
1820
}
1921
}
2022

23+
function getPackageName(cwd) {
24+
const { name } = JSON.parse(
25+
fs.readFileSync(cwd + '/package.json', { encoding: 'UTF-8' })
26+
)
27+
return name
28+
}
29+
2130
for (const path of packages) {
2231
try {
2332
const nextVersion = checkForNewVersion(path)
@@ -30,12 +39,12 @@ for (const path of packages) {
3039
{ cwd: path }
3140
)
3241
cp.execSync('npm publish --access=public', context)
33-
console.info(`The package in '${path}' was published as v${nextVersion}.`)
34-
} else {
35-
console.info("No update in '" + path + "'.")
42+
tags.push(`${getPackageName(path)}@${nextVersion}`)
3643
}
3744
} catch (e) {
3845
console.error(e)
3946
process.exitCode = 1
4047
}
4148
}
49+
50+
process.stdout.write(tags.join(' '))

0 commit comments

Comments
 (0)