Files
slack-github-action/.github/workflows/publish.yml

39 lines
1.0 KiB
YAML

name: Publish
on:
release:
types: [published, edited]
jobs:
build:
name: Build and tag a new version
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout the current code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
ref: ${{ github.event.release.tag_name }}
- name: Configure the runtime node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
cache: npm
cache-dependency-path: package-lock.json
node-version-file: .nvmrc
- name: Install project dependencies
run: npm ci
- name: Build a production release
run: npm run build
- name: Distribute the latest tagged release
uses: teunmooij/github-versioned-release@3edf649c6e5e5e976d43f2584b15bdc8b4c8f0df # v1.2.1
with:
template: javascript-action
env:
GITHUB_TOKEN: ${{ github.token }}