Skip to content

Commit 7516066

Browse files
committed
feat: first version v1.0.0
0 parents  commit 7516066

File tree

6 files changed

+16965
-0
lines changed

6 files changed

+16965
-0
lines changed

.github/workflows/release.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Release Workflow
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-22.04
15+
permissions:
16+
contents: write
17+
issues: write
18+
pull-requests: write
19+
id-token: write
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20.14.0'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Audit signatures
35+
run: npm audit signatures
36+
37+
- name: Run semantic-release
38+
env:
39+
GITHUB_TOKEN: ${{ github.token }}
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: npx semantic-release

.gitignore

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# history
11+
.history/
12+
13+
# Diagnostic reports (https://nodejs.org/api/report.html)
14+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
15+
16+
# Runtime data
17+
pids
18+
*.pid
19+
*.seed
20+
*.pid.lock
21+
22+
# Directory for instrumented libs generated by jscoverage/JSCover
23+
lib-cov
24+
25+
# Coverage directory used by tools like istanbul
26+
coverage
27+
*.lcov
28+
29+
# nyc test coverage
30+
.nyc_output
31+
32+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33+
.grunt
34+
35+
# Bower dependency directory (https://bower.io/)
36+
bower_components
37+
38+
# node-waf configuration
39+
.lock-wscript
40+
41+
# Compiled binary addons (https://nodejs.org/api/addons.html)
42+
build/Release
43+
44+
# Dependency directories
45+
node_modules/
46+
jspm_packages/
47+
48+
# Snowpack dependency directory (https://snowpack.dev/)
49+
web_modules/
50+
51+
# TypeScript cache
52+
*.tsbuildinfo
53+
54+
# Optional npm cache directory
55+
.npm
56+
57+
# Optional eslint cache
58+
.eslintcache
59+
60+
# Optional stylelint cache
61+
.stylelintcache
62+
63+
# Microbundle cache
64+
.rpt2_cache/
65+
.rts2_cache_cjs/
66+
.rts2_cache_es/
67+
.rts2_cache_umd/
68+
69+
# Optional REPL history
70+
.node_repl_history
71+
72+
# Output of 'npm pack'
73+
*.tgz
74+
75+
# Yarn Integrity file
76+
.yarn-integrity
77+
78+
# dotenv environment variable files
79+
.env
80+
.env.development.local
81+
.env.test.local
82+
.env.production.local
83+
.env.local
84+
85+
# parcel-bundler cache (https://parceljs.org/)
86+
.cache
87+
.parcel-cache
88+
89+
# Next.js build output
90+
.next
91+
out
92+
93+
# Nuxt.js build / generate output
94+
.nuxt
95+
dist
96+
97+
# Gatsby files
98+
.cache/
99+
# Comment in the public line in if your project uses Gatsby and not Next.js
100+
# https://nextjs.org/blog/next-9-1#public-directory-support
101+
# public
102+
103+
# vuepress build output
104+
.vuepress/dist
105+
106+
# vuepress v2.x temp and cache directory
107+
.temp
108+
.cache
109+
110+
# Docusaurus cache and generated files
111+
.docusaurus
112+
113+
# Serverless directories
114+
.serverless/
115+
116+
# FuseBox cache
117+
.fusebox/
118+
119+
# DynamoDB Local files
120+
.dynamodb/
121+
122+
# TernJS port file
123+
.tern-port
124+
125+
# Stores VSCode versions used for testing VSCode extensions
126+
.vscode-test
127+
128+
# yarn v2
129+
.yarn/cache
130+
.yarn/unplugged
131+
.yarn/build-state.yml
132+
.yarn/install-state.gz
133+
.pnp.*

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# semantic-release-gha-output
2+
3+
[![npm](https://img.shields.io/npm/v/semantic-release-gha-output.svg)](https://www.npmjs.com/package/semantic-release-gha-output)
4+
5+
A semantic-release plugin to output values from a GitHub Action.
6+
7+
| Step | Description |
8+
| ------------------ | -------------------------------------------------------------------------------------------- |
9+
| `verifyRelease` | Sets GitHub Action output variables. |
10+
11+
## Install
12+
13+
```bash
14+
$ npm install semantic-release-gha-output
15+
```
16+
17+
18+
## Outputs
19+
| Output | Description |
20+
| ------------------ | -------------------------------------------------------------------------------------------- |
21+
| `tag` | Next release git tag. |
22+
| `version` | Next release version. |
23+
24+
25+
## Usage
26+
27+
The plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration) or via CLI:
28+
29+
```json
30+
{
31+
"plugins": [
32+
"@semantic-release/commit-analyzer",
33+
"@semantic-release/release-notes-generator",
34+
"@semantic-release/github",
35+
"semantic-release-gha-output"
36+
]
37+
}
38+
```

index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { setOutput } from '@actions/core';
2+
3+
function verifyRelease(_pluginConfig, { nextRelease }) {
4+
setOutput("tag", nextRelease.gitTag);
5+
setOutput("version", nextRelease.version);
6+
}
7+
8+
export default {
9+
verifyRelease,
10+
};

0 commit comments

Comments
 (0)