Skip to content

add beta deploy job

add beta deploy job #3

Workflow file for this run

name: Build plugin
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "*.*.*-beta*"
env:
PLUGIN_NAME: obsidian-reminder
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update the versions
run: |
version=$(git tag --sort version:refname | tail -n 1)
# set manifest-beta.json version
sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" manifest.json
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x" # You might need to adjust this value to your own version
- name: Build
id: build
run: |
npm ci
npm run build
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
echo "tag_name=$(git tag --sort version:refname | tail -n 1) >> $GITHUB_OUTPUT"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: ${{ env.RELEASE_VERSION }}
draft: true
prerelease: false
files: |
${{ env.PLUGIN_NAME }}.zip
main.js
manifest.json
styles.css