test(Release): test #62
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- feature/main-workflow-test-v2 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current branch (release) | |
uses: actions/checkout@v2 | |
with: | |
ref: feature/main-workflow-test-v2 | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Configure Git | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Install modules | |
run: npm ci | |
- name: Build icons | |
run: npm run build:icons | |
- name: Lerna version | |
run: lerna version --conventional-commits --no-changelog --no-git-tag-version --no-push --yes | |
- name: Display modified files | |
run: | | |
git status --short | |
git status --short > status.txt | |
cat status.txt | |
- name: Display detailed diff | |
run: | | |
git diff | |
git diff > diff.txt | |
cat diff.txt | |
# - name: Build icons | |
# run: npm run build:icons | |
# - name: Configure npm authentication | |
# run: | | |
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
# - name: Bump version with Lerna and publish | |
# run: npm run deploy:auto | |
# env: | |
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}, | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Pull latest changes from remote | |
# run: git pull origin release | |
# - name: Check for changes between release and main | |
# run: | | |
# git fetch origin main | |
# if [ "$(git rev-list --count release..origin/main)" -eq 0 ]; then | |
# echo "No changes to merge. Skipping PR creation." | |
# exit 0 | |
# fi | |
- name: Create merge-back PR to main using GitHub API | |
run: | | |
curl -X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
-d '{"title":"[TEST] Merge-back: release to main","body":"This is an automated PR to merge the release branch into main after version bump and publish.","head":"feature/main-workflow-test-v2","base":"main"}' \ | |
https://api.github.com/repos/${{ github.repository }}/pulls |