Skip to content

Commit

Permalink
prepare lib for @Alfalab space
Browse files Browse the repository at this point in the history
  • Loading branch information
fulcanellee committed Jul 16, 2024
1 parent cacc099 commit 8e5330d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 4 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish

on:
workflow_dispatch:
inputs:
version:
description: 'Введите версию x.x.x'
required: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check permissions
if: ${{ contains(fromJSON('["reme3d2y","Valeri8888","SiebenSieben","fulcanellee"]'), github.actor) == false }}
uses: actions/github-script@v6
with:
script: |
core.setFailed("you don't have permission to run this workflow!");
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: yarn --pure-lockfile

- name: Build app
run: yarn build

- name: Set version
if: success()
run: |
git config user.name core-ds-bot
git config user.email [email protected]
yarn --new-version version ${{ github.event.inputs.version }}
git push
- name: Publish
if: success()
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Push tag
if: success()
run: git push origin --tags
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ export const PatternLock = (props) => (
<ReactCanvasPatternLock {...props}/>
)
```

## Publish
Run `Publish` action from github actions
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-canvas-pattern-lock",
"name": "@alfalab/react-canvas-pattern-lock",
"version": "2.0.6",
"description": "Android's react pattern lock",
"main": "dist/index.js",
Expand All @@ -21,11 +21,9 @@
"pattern",
"lock"
],
"author": "Lacronts <[email protected]>",
"homepage": "https://github.com/Lacronts/react-canvas-pattern-lock#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Lacronts/react-canvas-pattern-lock.git"
"url": "git+https://github.com/core-ds/react-canvas-pattern-lock.git"
},
"dependencies": {
"react-merge-refs": "^1.1.0",
Expand Down

0 comments on commit 8e5330d

Please sign in to comment.