Skip to content

Update create-release.yml #2

Update create-release.yml

Update create-release.yml #2

Workflow file for this run

name: Create Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Specify the Node.js version you need
- name: Install dependencies
run: npm install
- name: Build plugin zip
run: npm run plugin-zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dark-mode-toggle-block.zip
asset_name: dark-mode-toggle-block.zip
asset_content_type: application/zip