Skip to content

Commit

Permalink
Release workflow inited.
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaskov committed Aug 16, 2023
1 parent b06b012 commit 081438e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: release

on:
pull_request:
paths-ignore:
- 'docs/**'
- '.clang-format'
- '.gitignore'
- 'README.md'
workflow_dispatch:
inputs:
release_type:
type: choice
description: Release type
options:
- major
- minor
- patch
default: patch

jobs:
release:
runs-on: [ ubuntu-22.04 ]
environment: prod

steps:
- name: Check out branch
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Set git user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'bot@nil.foundation'
- name: Setup Node.js environment
uses: actions/setup-node@v3.6.0
with:
registry-url: 'https://npm.pkg.github.com'

- name: Update version in package.json
run: |
npm version patch -m "${{ inputs.release_type }} release %s"
git status
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.event.pull_request.head.ref }}
tags: true

- name: Publish package on NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"type": "git",
"url": "https://github.com/nilfoundation/evm-placeholder-verification.git"
},
"publishConfig": {
"access": "public"
},
"author": "Mikhail Komarov, Aleksey Moskvin, Ilia Shirobokov, Elena Tatuzova, Polina Chernyshova",
"license": "Apache",
"bugs": {
Expand Down

0 comments on commit 081438e

Please sign in to comment.