Skip to content

chore(release): 1.1.2 #37

chore(release): 1.1.2

chore(release): 1.1.2 #37

Workflow file for this run

name: Release Obsidian Plugin
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '[0-9]+.[0-9]+.[0-9]+' # Push events to matching any tag format, i.e. 1.0, 20.15.10
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
ACTIONS_RUNNER_DEBUG : true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Use Node.js ⚙️
uses: actions/setup-node@v3
with:
node-version: 20
- name: Setup PNPM ⚙️
uses: pnpm/action-setup@v2
with:
version: 9
# Get the version number and put it in a variable
# - name: Get Version
# id: version
# run: |
# echo "::set-output name=tag::$(git describe --abbrev=0)"
- name: Get Version 🏷️
id: version
run: |
echo "tag=$(git describe --abbrev=0)" >> $GITHUB_OUTPUT
# Build the plugin
- name: Build Plugin 🏗️
id: build
run: |
pnpm install
pnpm run build
# Package the required files into a zip
- name: Package Plugin 📦
run: |
mkdir ${{ github.event.repository.name }}
cp ./dist/main.js ./dist/manifest.json ./dist/styles.css README.md ${{ github.event.repository.name }}
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
# Package the docs/vault files into a zip
- name: Package Vault 📦
run: |
mkdir ${{ github.event.repository.name }}/vault
cp -R docs/. ${{ github.event.repository.name }}/vault
zip -r ${{ github.event.repository.name }}.vault.zip ${{ github.event.repository.name }}/vault
- name: Release Plugin 🚀
uses: ncipollo/release-action@v1
id: release_plugin
with:
artifacts: './${{ github.event.repository.name }}.zip,./${{ github.event.repository.name }}.vault.zip,./dist/main.js,./dist/manifest.json,./dist/styles.css'
name: ${{ github.ref_name }}
draft: true
generateReleaseNotes: true
discussionCategory: announcements