Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New GH workflow with semver #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Release
on:
push:
tags:
- v**
branches: [main]

jobs:
publish:
Expand All @@ -16,11 +15,16 @@ jobs:
- run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- run: yarn install --immutable --immutable-cache --check-cache
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- run: yarn tsc
- run: yarn build
# VERSION has v prefix but yarn wants valid semver.
- run: yarn publish --new-version ${VERSION:1} --access public --no-git-tag-version
- name: Create .npmrc file
run: |
echo registry=https://registry.npmjs.org/ > .npmrc
- name: Release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ github.ref_name }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cnoe-io/plugin-scaffolder-actions",
"version": "0.1.0",
"version": "0.0.0",
"description": "A custom Backstage scaffolder action to do CNOE verifications",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
Expand Down