https://github.com/maks11060/deno-publish-version
Set publish version from github tag
https://github.com/maks11060/deno-publish-version
deno jsr publish
Last synced: about 2 months ago
JSON representation
Set publish version from github tag
- Host: GitHub
- URL: https://github.com/maks11060/deno-publish-version
- Owner: MAKS11060
- License: mit
- Created: 2024-07-03T16:14:40.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-11-16T09:03:51.000Z (5 months ago)
- Last Synced: 2025-01-13T21:44:43.797Z (3 months ago)
- Topics: deno, jsr, publish
- Language: TypeScript
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Publish Version
[](https://github.com/MAKS11060/deno-publish-version/actions/workflows/ci.yml)
Change the version of the package before publishing it.
Any **'Package'** files containing the `"version": "0.0.0"` are supported.
- Default files: `deno.jsonc, deno.json, jsr.json, package.json`
# Usage
```yml
- uses: denoland/setup-deno@v2- uses: maks11060/deno-publish-version@v2
with:
# Default: [deno.jsonc|deno.json|jsr.json|package.json]
config-file:# Default: ${{ github.event.release.tag_name }} 'v1.2.3' or '1.2.3'
tag:
```# Examples
Publishing after creating a release
```yml
# publish.yml
name: Publishon:
release:
types: [published]jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with JSR.steps:
- name: Clone repository
uses: actions/checkout@v4- name: Set up Deno 2
uses: denoland/setup-deno@v2- name: Set version # Get the version from the release tag and update in [config].json
uses: maks11060/deno-publish-version@v2- name: Publish to JSR
run: deno publish --allow-dirty
```Publishing after tag creation
```yml
# publish.yml
name: Publishon:
push:
tags: 'v*.*.*'jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with JSR.steps:
- name: Clone repository
uses: actions/checkout@v4- name: Set up Deno 2
uses: denoland/setup-deno@v2- name: Set version # Get the version from tag and update it in [config].json
uses: maks11060/deno-publish-version@v2
with:
tag: ${{ github.ref_name }}- name: Publish to JSR
run: deno publish --allow-dirty
```