Sha256: 1b5d60a532833ae446d909d94da0628e81a550130984402306b5b6604dc3582a

Contents?: true

Size: 1015 Bytes

Versions: 3

Compression:

Stored size: 1015 Bytes

Contents

name: Create release

on:
  push:
    branches: main

jobs:
  build:
    name: Retrieve version + create release
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
      
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.x

    - name: Retrieve version
      id: version
      run: |
        version=$(ruby -e 'require "./lib/yajp/gem_version.rb"' -e 'puts Yajp::VERSION')
        echo "TAG_NAME=$version" >> $GITHUB_ENV
        latest_tag=$(git describe --tags --abbrev=0)
        echo 'VERSION_DESCRIPTION<<EOF' >> $GITHUB_ENV
        git log --pretty='format:%h %s' ${latest_tag}..HEAD >> $GITHUB_ENV
        echo $'\nEOF' >> $GITHUB_ENV

    - name: Create release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ env.TAG_NAME }}
        release_name: v${{ env.TAG_NAME }}
        body: ${{ env.VERSION_DESCRIPTION }}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danger-yajp-1.0.1 .github/workflows/create-tag.yml
danger-yajp-1.0.0 .github/workflows/create-tag.yml
danger-yajp-0.1.3 .github/workflows/create-tag.yml