Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodnf committed Jul 12, 2022
1 parent 54c742c commit 34b7ac2
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: "Release"
on:
pull_request:
push:
paths:
- 'package.json'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:

- name: Checking out the project
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16

- id: releaser
name: New Version Decider
uses: thiagodnf/new-version-decider@v0.0.5
with:
loader: nodejs
configurationFile: ./package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release on Github
uses: softprops/action-gh-release@v1
if: ${{steps.releaser.outputs.newVersion == 'true' }}
with:
name: ${{ steps.releaser.outputs.currentVersion }}
tag_name: v${{steps.releaser.outputs.currentVersion}}
# files: "*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 34b7ac2

Please sign in to comment.