semantic-release-gha-output 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
package/README.md ADDED
@@ -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
+ ```
package/index.js ADDED
@@ -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
+ };
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "semantic-release-gha-output",
3
+ "author": {
4
+ "name": "Zachary Spar",
5
+ "email": "zachspar@gmail.com"
6
+ },
7
+ "version": "1.0.0",
8
+ "type": "module",
9
+ "homepage": "https://github.com/zachspar/semantic-release-gha-output",
10
+ "repository": "git@github.com:zachspar/semantic-release-gha-output.git",
11
+ "bugs": "https://github.com/zachspar/semantic-release-gha-output/issues",
12
+ "readme": "README.md",
13
+ "license": "MIT",
14
+ "dependencies": {
15
+ "@actions/core": "1.10.1"
16
+ },
17
+ "description": "A semantic-release plugin to output values from a GitHub Action.",
18
+ "main": "index.js",
19
+ "peerDependencies": {
20
+ "semantic-release": ">=17"
21
+ },
22
+ "devDependencies": {
23
+ "semantic-release": ">=17",
24
+ "semantic-release-gha-output": "."
25
+ },
26
+ "release": {
27
+ "repositoryUrl": "https://github.com/zachspar/semantic-release-gha-output.git",
28
+ "plugins": [
29
+ "@semantic-release/commit-analyzer",
30
+ "@semantic-release/release-notes-generator",
31
+ "@semantic-release/github",
32
+ "@semantic-release/npm"
33
+ ]
34
+ }
35
+ }