forked from ivan-lednev/obsidian-day-planner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
129 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build and Update Release Branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
|
||
build: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: Set up Node.js (if you're using Node.js for your build process) | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build release files | ||
run: npm run build | ||
|
||
- name: copy release files | ||
run: | | ||
mkdir temp | ||
cp main.js manifest.json styles.css README.md temp/ | ||
- name: Checkout release branch | ||
run: | | ||
git fetch origin | ||
git switch release | ||
- name: update release files | ||
run: | | ||
cp -r temp/* . | ||
rm -rf temp | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
git commit -m "Update release files" | ||
git push origin release --force | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.