Skip to content

Commit

Permalink
chore: merge main into feature/test
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7061 committed Aug 22, 2024
2 parents 45145b1 + c1cda54 commit 062d56c
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 17 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release and publish to npm
on:
workflow_dispatch:
inputs:
input_version:
type: choice
description: What type of release?
options:
- patch
- minor
- major

concurrency : ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Test inputs
run: echo "Type of release:${{ github.event.inputs.input_version }} from user ${GITHUB_ACTOR}"

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'yarn'

- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: GPG user IDs
run: |
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import-gpg.outputs.keyid }}"
echo "name: ${{ steps.import-gpg.outputs.name }}"
echo "email: ${{ steps.import-gpg.outputs.email }}"
- name: git config
run: |
git config user.name "${{ steps.import-gpg.outputs.name }}"
git config user.email "${{ steps.import-gpg.outputs.email }}"
- name: Install dependencies
run: corepack enable && yarn install

- name: Authenticate with registry
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Run release-it
run: npx release-it ${{ github.event.inputs.input_version }} --ci
env:
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
96 changes: 81 additions & 15 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,83 @@
{
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "${version}"
},
"npm": {
"publish": true
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
"$schema": "https://unpkg.com/release-it@17/schema/release-it.json",
"hooks": {
"before:init": [
"rm -f *.tgz",
"yarn pack --out '%s_%v.tgz'"
],
"after:bump": "npx auto-changelog -p"
},
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "${version}",
"commitArgs": [
"-S"
],
"tagArgs": [
"-s"
]
},
"npm": {
"publish": false,
"publishArgs": [
"--provenance"
]
},
"github": {
"release": true,
"assets": [
"*.tgz"
],
"tokenRef": "BOT_GITHUB_TOKEN"
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Code Refactoring"
},
{
"type": "test",
"section": "Tests"
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration"
}
]
},
"infile": "CHANGELOG.md"
}
}
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evva-sfw/abrevva-react-native",
"version": "0.1.0",
"version": "0.1.3",
"author": "EVVA Sicherheitstechnologie GmbH",
"description": "The EVVA React-Native Module is a collection of tools to work with electronical EVVA access components. It allows for scanning and connecting via BLE.",
"source": "./src/index.tsx",
Expand Down Expand Up @@ -61,7 +61,8 @@
},
"homepage": "https://github.com/evva-sfw/abrevva-react-native",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"devDependencies": {
"@commitlint/config-conventional": "^19.2.2",
Expand Down

0 comments on commit 062d56c

Please sign in to comment.