Skip to content

Commit

Permalink
Fixed beta pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffrank913 committed Nov 29, 2024
1 parent e6abd24 commit ae5df6a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
52 changes: 23 additions & 29 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,42 +96,36 @@ jobs:
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn

- name: 'Automated Version Bump (Beta)'
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: 'DIVE[bot]'
GITHUB_EMAIL: '[email protected]'
with:
target-branch: 'trunk'
commit-message: 'DIVE[bot]: Beta {{version}} [pre-beta] [skip ci]'
skip-push: 'true'
skip-tag: 'true'
- name: Register git user
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: 'Create beta branch'
run: git checkout -b beta/v$(node -p "require('./package.json').version")
- name: 'Bump version to beta'
run: |
npm version prerelease --preid=beta --no-git-tag-version
git add package.json
- name: Build DIVE
run: yarn build
- name: Add build files
run: git add ./build -f

- name: 'Add Build files to git'
run: |
git add ./build -f
echo "Staged build files! Status:"
git status
- name: 'Create beta branch'
run:
git checkout -b beta/v$(node -p "require('./package.json').version")

- name: 'Commit changes'
- name: Commit changes
run: |
echo "Committing ..."
git commit -m "Beta v$(node -p "require('./package.json').version") [skip ci]"
echo "Committed! Status:"
git status
git commit -m "Beta v$(node -p "require('./package.json').version")"
git tag -a v$(node -p "require('./package.json').version") -m "Beta v$(node -p "require('./package.json').version")"
- name: 'Add beta tag'
run: git tag -a v$(node -p "require('./package.json').version") -m "Beta v$(node -p "require('./package.json').version")"
- name: Push changes
run: |
git push origin beta/v$(node -p "require('./package.json').version") --follow-tags
- name: 'Push to beta branch'
run: git push origin beta/v$(node -p "require('./package.json').version") && git push origin tag v$(node -p "require('./package.json').version")
- name: Authenticate with NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc

- name: Publish Beta tag to npm
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ jobs:
- name: Install dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn

- name: Generate README.md
run: yarn generate-readme

- name: 'Add README file to git'
run: git add README.md -f

- name: 'Automated Version Bump'
uses: 'phips28/gh-action-bump-version@master'
env:
Expand All @@ -112,6 +115,7 @@ jobs:
commit-message: 'DIVE[bot]: Release {{version}} [skip ci]'
skip-push: 'true'
skip-tag: 'true'

- name: Push to protected branch trunk
uses: CasperWA/push-protected@v2
with:
Expand Down

0 comments on commit ae5df6a

Please sign in to comment.