mirror of
https://github.com/benjlevesque/short-sha.git
synced 2025-12-06 17:57:50 +01:00
35 lines
868 B
YAML
35 lines
868 B
YAML
name: "Release"
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
type: string
|
|
required: true
|
|
description: The tag to create
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.ref_name }}
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16'
|
|
cache: 'yarn'
|
|
- name: Install project dependencies
|
|
run: yarn --prefer-offline
|
|
- name: Build
|
|
run: yarn build
|
|
- name: Commit & Push changes
|
|
run: |
|
|
git config user.name 'github-actions[bot]'
|
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
|
git add dist/
|
|
git commit -m "Release ${{ github.event.inputs.tag }}"
|
|
git tag ${{ github.event.inputs.tag }}
|
|
git push
|
|
git push --tags
|
|
|