Skip to content

Commit

Permalink
fix(workflow): Fix git interactions
Browse files Browse the repository at this point in the history
- Allow contents to be written
- Rename master to main branch, and push to it
- Set up git user
  • Loading branch information
fb55 committed Jul 24, 2024
1 parent 4e80a0a commit 5914c2a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: "CodeQL"

on:
push:
branches: [master]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
branches: [main]
schedule:
- cron: "0 0 * * 0"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
on:
push:
branches:
- master
- main

env:
FORCE_COLOR: 2
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

permissions:
contents: read
contents: write
id-token: write

steps:
Expand All @@ -25,8 +25,11 @@ jobs:

- name: Update package version to latest tag
run: |
npm version from-git --allowSameVersion
git push --follow-tags
# Set up git user
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
npm version --allow-same-version from-git
git push --follow-tags origin HEAD:main
- name: Create jsr.json based on package.json
run: |
Expand Down

0 comments on commit 5914c2a

Please sign in to comment.