Skip to content

Commit

Permalink
fix: Publish badge (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmandM authored May 15, 2024
1 parent cb3fd6f commit d0e7c8a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 102 deletions.
93 changes: 0 additions & 93 deletions .github/workflows/publish.yml

This file was deleted.

23 changes: 15 additions & 8 deletions .github/workflows/release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,30 @@ jobs:
- run: npm run build
- run: npm run lint
- run: npm test
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_committer_name: github-actions[bot]
git_committer_email: 41898282+github-actions[bot]@users.noreply.github.com
- id: update_version
name: Update Package Version
run: |
date > generated.txt
echo foo > bar.txt
set -e
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if [[ ${{ inputs.prerelease }} ]]; then
# save the value would be created, then remove all changes
new_version=$(npm version ${{ inputs.semver_type }} --no-commit-hooks --no-git-tag-version )
git reset --hard
else
new_version=$(npm version ${{ inputs.semver_type }} )
new_version=$(npm version ${{ inputs.semver_type }} --sign-git-tag )
git push && git push --tags
fi
echo "Created version ${new_version}"
git push && git push --tags
echo "version_number=$new_version" >> $GITHUB_OUTPUT
- id: pack_tar
Expand Down
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
test:
npm test

build:
npm run build

check-next-version:
npm version --no-commit-hooks --no-git-tag-version patch
git reset --hard

test-next-version:
npm pack

pack: test-next-version

RED := $(shell tput setaf 196)
RESET := $(shell tput setaf 15)

release: build test-next-version check-next-version
echo "${RED}!! Run Release and Publish Github Action !!${RESET}"

publish: release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#### Intuitive mocking for Typescript imports.

[![npm](https://img.shields.io/npm/v/ts-mock-imports.svg)](https://www.npmjs.com/package/ts-mock-imports) [![Build Status](https://github.com/EmandM/ts-mock-imports/actions/workflows/publish.yml/badge.svg)](https://github.com/EmandM/ts-mock-imports/actions/workflows/publish.yml) [![Test Status](https://github.com/EmandM/ts-mock-imports/actions/workflows/test.yml/badge.svg)](https://github.com/EmandM/ts-mock-imports/actions/workflows/test.yml)
[![npm](https://img.shields.io/npm/v/ts-mock-imports.svg)](https://www.npmjs.com/package/ts-mock-imports) [![Build Status](https://github.com/EmandM/ts-mock-imports/actions/workflows/release-and-publish.yml/badge.svg)](https://github.com/EmandM/ts-mock-imports/actions/workflows/release-and-publish.yml) [![Test Status](https://github.com/EmandM/ts-mock-imports/actions/workflows/test.yml/badge.svg)](https://github.com/EmandM/ts-mock-imports/actions/workflows/test.yml)

## About

Expand Down

0 comments on commit d0e7c8a

Please sign in to comment.