Skip to content

Commit

Permalink
Merge pull request #194 from 1Hive/branch_v6.0.2
Browse files Browse the repository at this point in the history
Branch v6.0.2
  • Loading branch information
pglavin2 authored May 21, 2023
2 parents 85c0dfe + da8e2a1 commit d7b9caf
Show file tree
Hide file tree
Showing 11 changed files with 18,129 additions and 2,731 deletions.
46 changes: 41 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,50 @@
name: Tests
on: [push, pull_request]
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
name: Unit Tests
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 20
- run: npm install
- run: npm test
# pass branch name to test script
- run: npm run test -- --commit ${{ github.sha }}

create-tag:
needs: test
runs-on: ubuntu-latest
name: Create Tag
if: startsWith(github.ref, 'refs/heads/branch_v')
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Read package.json
id: read-package-json
run: |
VERSION=$(node -p "require('./package.json').version")
echo "::set-output name=version::$VERSION"
- name: Check if tag exists
id: check-tag
run: |
if git rev-parse "refs/tags/v${{ steps.read-package-json.outputs.version }}" >/dev/null 2>&1; then
echo "::set-output name=tag_exists::true"
else
echo "::set-output name=tag_exists::false"
fi
- name: Create tag
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
if [[ "${{ steps.check-tag.outputs.tag_exists }}" == "false" ]]; then
git tag -a v${{ steps.read-package-json.outputs.version }} -m "Auto-generated tag"
git push origin v${{ steps.read-package-json.outputs.version }}
else
echo "Tag already exists. Skipping tag creation."
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
node_modules
build/
build/
.yarn
Loading

1 comment on commit d7b9caf

@vercel
Copy link

@vercel vercel bot commented on d7b9caf May 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.