diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d588a15..98566c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,37 +1,34 @@ name: Release Obsidian plugin on: - push: - tags: - - '*' + push: + tags: + - "*" jobs: - build-and-release: - runs-on: ubuntu-latest + build: + runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '20.x' - cache: 'npm' + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: "20.x" - - name: Install dependencies - run: npm ci + - name: Build plugin + run: | + npm install + npm run build - - name: Build plugin (Vite production build) - run: npm run build + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tag="${GITHUB_REF#refs/tags/}" - - name: Create release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - tag="${GITHUB_REF#refs/tags/}" - - gh release create "$tag" \ - --title="$tag" \ - --draft \ - main.js manifest.json styles.css + gh release create "$tag" \ + --title="$tag" \ + --draft \ + main.js manifest.json styles.css \ No newline at end of file