Skip to content

fix for beta checking #120

fix for beta checking

fix for beta checking #120

Workflow file for this run

name: Release Obsidian Plugin
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- uses: actions/setup-node@v3
with:
node-version: "21.x" # You might need to adjust this value to your own version
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Git Submodule Update
run: |
git submodule update --init
# Build the plugin
- name: Build
run: |
pnpm i
pnpm run build
# Get the version number and put it in a variable
- name: Get version info
id: version
run: |
echo "name=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT
- name: Prepare manifest file
run: |

Check failure on line 46 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 46
if [[ "${{ contains(steps.version.outputs.name, '-beta') }}" == 'true' ]]; then
cp manifest-beta.json manifest.json
else
cp manifest.json manifest.json
fi
shell: bash
# Package the required files into a zip
- name: Package plugin archive
run: |
mkdir ${{ github.event.repository.name }}
cp main.js styles.css manifest.json README.md ${{ github.event.repository.name }}
zip -r ${{ github.event.repository.name }}-${{ steps.version.outputs.name }}.zip ${{ github.event.repository.name }}
# Create the release on GitHub
- name: Create release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
${{ github.event.repository.name }}-${{ steps.version.outputs.name }}.zip
styles.css
main.js
manifest.json
name: ${{ steps.version.outputs.name }}
prerelease: ${{ endsWith(github.ref, '-beta') }}
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}