Simplify logic that determines if a file is text or binary #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release plugin | |
on: | |
push: | |
tags: | |
- "[0-9].[0-9]+.[0-9]+*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
- name: Build plugin | |
run: | | |
npm install | |
npm run build | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
if [[ "${{ github.ref_name }}" == *-beta ]]; then | |
gh release create "${{ github.ref_name }}" \ | |
--title="${{ github.ref_name }}" \ | |
--prerelease \ | |
main.js manifest.json styles.css | |
else | |
gh release create "${{ github.ref_name }}" \ | |
--title="${{ github.ref_name }}" \ | |
main.js manifest.json styles.css | |
fi |