-
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
1 parent
9d6f002
commit e33579a
Showing
1 changed file
with
66 additions
and
0 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,66 @@ | ||
name: Build Obsidian Plugin Beta | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
PLUGIN_NAME: obsidian-ribbon-divider | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "beta" | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "20.x" | ||
- name: Get Package Version | ||
id: get_package_version | ||
run: echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | ||
- name: Build | ||
id: build | ||
run: | | ||
echo Building for version PACKAGE_VERSION | ||
npm ci | ||
npm run build | ||
zip -jr ${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip dist/* | ||
ls | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.PACKAGE_VERSION }} | ||
prerelease: true | ||
files: | | ||
${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip | ||
dist/main.js | ||
dist/manifest.json | ||
dist/styles.css | ||
- name: Create beta manifest | ||
id: createbetamanifest | ||
run: | | ||
cp -f manifest.json manifest-beta.json | ||
- name: Upload manifest-beta.json | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: manifest-beta | ||
path: manifest-beta.json | ||
update_mainifest_beta_main: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "main" | ||
- name: Download manifest-beta | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: manifest-beta | ||
- name: Commit | ||
id: commit | ||
run: | | ||
git config --local user.name 'Github Actions' | ||
git config --local user.email '[email protected]' | ||
git add . | ||
git commit -m "Update manifest-beta.json" | ||
git push |