Skip to content

ci: adjust release workflow #5

ci: adjust release workflow

ci: adjust release workflow #5

Workflow file for this run

name: Release
on:
push:
branches:
- main
- next
- beta
- '*.x'
- '*.*.x'
release:
types:
- created
permissions:
contents: write
issues: write
pull-requests: write
jobs:
build:
if: github.event_name == 'release'
name: Build
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build
if-no-files-found: error
retention-days: 5
path: |
dist/sag-ps-iot-pkg-webrtc-webcam-plugin.zip
- name: Release
uses: softprops/action-gh-release@v2
with:
prerelease: false
generate_release_notes: false
files: |
./dist/sag-ps-iot-pkg-webrtc-webcam-plugin.zip
release:
if: github.event_name == 'push'
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release