Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vdustr/semver-action
Simple semver github action supporting experimental versioning.
https://github.com/vdustr/semver-action
action ci github publish release semantic semver version workflow
Last synced: about 2 months ago
JSON representation
Simple semver github action supporting experimental versioning.
- Host: GitHub
- URL: https://github.com/vdustr/semver-action
- Owner: VdustR
- License: mit
- Created: 2022-09-24T01:45:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-24T07:55:35.000Z (over 2 years ago)
- Last Synced: 2024-10-31T10:44:35.871Z (2 months ago)
- Topics: action, ci, github, publish, release, semantic, semver, version, workflow
- Homepage: https://github.com/marketplace/actions/simple-semantic-version
- Size: 4.88 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Semantic Version
Simple semantic versioning supporting experimental releases.
## Usage
```yml
name: Test Versionon:
push:
branches:
- experimental
tags:
- v*.*.*
- v*.*.*-*jobs:
container-job:
runs-on: ubuntu-lateststeps:
- id: version
uses: VdustR/semver-action@v0
with:
defaultTag: "latest" # Optional. Only when tags matching `v*.*.*` .
- name: Echo result
run: |
echo ${{ steps.version.outputs.version }}
echo ${{ steps.version.outputs.tag }}
```| Git tag | Version | Package Tag |
| ------------- | ------------ | --------------- |
| v1.2.3 | 1.2.3 | `${defaultTag}` |
| v1.2.3-rc | 1.2.3-rc | rc |
| v1.2.3-rc.1 | 1.2.3-rc.1 | rc |
| v1.2.3-beta.1 | 1.2.3-beta.1 | beta || Git Branch | Version | Package Tag |
| ------------ | --------------------------- | ------------ |
| nightly | 0.0.0-nightly.`${sha}` | nightly |
| experimental | 0.0.0-experimental.`${sha}` | experimental |## Example
```yml
name: NPM Publishon:
push:
branches:
- experimental
tags:
- v*.*.*
- v*.*.*-*jobs:
container-job:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- id: version
uses: VdustR/semver-action@v0
- name: version
run: npm --no-git-tag-version version ${{ steps.version.outputs.version }}
- name: Publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ steps.version.outputs.tag }}
access: public
```## License
[MIT](./LICENSE)
Copyright ©️ 2022-present ViPro (京京)