Skip to content

Commit adc64e4

Browse files
committed
chore: Match package version to latest tagged version
1 parent a8ef869 commit adc64e4

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

buildspec_integ.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ phases:
2222

2323
# Run integration tests
2424
- ./run_integ_test.sh
25+
finally:
26+
- rm .git/credentials

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-actions-configure-aws-credentials",
3-
"version": "0.0.0",
3+
"version": "1.0.1",
44
"description": "Configure AWS Credentials",
55
"main": "index.js",
66
"scripts": {

release.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
# Generate a new version number and version tag, based on conventional commits
6+
standard-version
7+
8+
# Prevent major version bumps: these warrant extra scrutiny
9+
NEW_VERSION=`cat package-lock.json | jq -r '.version'`
10+
if [[ ! "$NEW_VERSION" =~ ^v1\. ]]; then
11+
echo "New major version! $NEW_VERSION"
12+
exit 1
13+
fi
14+
15+
# Push the new version tag
16+
git push --follow-tags origin master
17+
18+
# Create a GitHub release for the new version
19+
dpl --provider=releases \
20+
--name="v$NEW_VERSION" \
21+
--tag_name="v$NEW_VERSION" \
22+
--api_key="$GITHUB_TOKEN" \
23+
--draft=$IS_DRAFT
24+
25+
# Update the 'v1' tag to point to the new version
26+
git tag -f v1
27+
git push -f origin v1

0 commit comments

Comments
 (0)