Skip to content

Workflow file for this run

name: Create Release on Tagged Commit
on:
push:
branches:
- main
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get tag for current commit
id: get_tag
run: |
tag=$(git tag --points-at $GITHUB_SHA)
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Create release
if: ${{ steps.get_tag.outputs.tag }}
uses: actions/create-release@v1
with:
tag_name: ${{ steps.get_tag.outputs.tag }}
release_name: ${{ steps.get_tag.outputs.tag }}
body: |
[![npm](https://img.shields.io/badge/npm-v${{ steps.get_tag.outputs.tag }}-blue.svg)](https://www.npmjs.com/package/use-m/v/${{ steps.get_tag.outputs.tag }})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}