Skip to content

Commit

Permalink
Merge pull request #23 from joberstein/#21
Browse files Browse the repository at this point in the history
#21: Use dist tag in deploy script
  • Loading branch information
joberstein authored Aug 4, 2023
2 parents cccabd4 + d29cd53 commit 901df11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The Github Workflow for this repo automatically commits up-to-date dist based on

The deploy script (./deploy.sh) will deploy to the 'release' breanch, which is orphaned so that it's history and contents is distinct from the 'master' branch, which contains all of the original source code.

Callers wishing to use this action simply need to reference this repo per the standard convention (i.e. joberstein/[email protected]).
Callers wishing to use this action should reference this repo by a versioned tag with the 'dist' suffix (i.e. joberstein/[email protected]-dist). The source code is released under the standard version tag (vX.Y.Z), whereas the actual deploy artifacts are accessible with (vX.Y.Z-dist) for the same version. The source code does not contain 'node_modules', the 'dist' folder, or any other deploy artifacts.

# Scenarios
# Scenarios

Validate commits for events like:

Expand All @@ -23,7 +23,7 @@ Validate commits for events like:

```yaml
- name: Validate Commits
uses: joberstein/[email protected]
uses: joberstein/[email protected]-dist
with:
extra_config: @joberstein12/commitlint-config
```
Expand Down
5 changes: 3 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
SOURCE_BRANCH=$(git branch --show-current)
TARGET_BRANCH="release"
VERSION=$1
NEW_TAG=v${VERSION}-dist

if [ -z $VERSION ];
then
Expand Down Expand Up @@ -30,8 +31,8 @@ git add -vA
echo "Committing files..."
git commit -vm "Deploy $VERSION"

echo "Adding tag 'v${VERSION}'"
git tag "v${VERSION}"
echo "Adding tag '${NEW_TAG}'"
git tag "$NEW_TAG"

echo "Pushing commit..."
git push origin -u "${TARGET_BRANCH}" \
Expand Down

0 comments on commit 901df11

Please sign in to comment.