craig-day / compute-tag Goto Github PK
View Code? Open in Web Editor NEWAn action to compute the next tag for git
License: BSD 3-Clause "New" or "Revised" License
An action to compute the next tag for git
License: BSD 3-Clause "New" or "Revised" License
Started getting the following warning recently when using this action:
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: craig-day/compute-tag
The log portion for this action:
Run craig-day/compute-tag@v10
with:
github_token: ***
version_scheme: semantic
version_type: prerelease
prerelease_suffix: beta
Computing the next tag based on: 8.1_r20
Computed the next tag as: 8.1.1-beta.0
That tag is over three years, and many tags old
Getting this warning from Github Actions:
Warning: The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
According to the post, this can be resolved by updating @actions/core
to v1.10.0.
The version v15 failed generating the new tag based on the previous tag.
Output:
with:
github_token: ***
version_scheme: continuous
version_type: patch
tag_fetch_depth: 10
prerelease_suffix: beta
Hello,
I tried to update our version of the action from v10 to v15 and got it fail because it doesn't correctly compute the next tag.
Here is the action call:
- name: Compute next tag
id: compute-tag
uses: craig-day/compute-tag@v10
with:
github_token: ${{ github.token }}
version_scheme: semantic
version_type: "${{ fromJSON(steps.compute-release.outputs.release).type }}"
Here is my output of the action:
Run craig-day/compute-tag@v15
with:
github_token: ***
version_scheme: semantic
version_type: patch
tag_fetch_depth: 10
prerelease_suffix: beta
env:
pythonLocation: /opt/hostedtoolcache/Python/3.10.0/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.0/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.0/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.0/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.0/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.0/x64/lib:/usr/local/lib
Fetching tags.
Computing the next tag based on: v17.7.17
Computed the next tag as: v17.7.17
As we can see, the patch number of the tag didn't get bumped while we correctly provide the arguments for patch semantic.
craig-day/compute-tag@v15
with:
github_token: ***
version_scheme: semantic
version_type: patch
tag_fetch_depth: 10
prerelease_suffix: beta
Fetching tags.
Computing the next tag based on: v1.0.11
Computed the next tag as: v1.0.11
Hi. I'm using the action on a new repo with no existing tags, and it's computing the following tag:
Fetching existing tags. This may take a while on large repositories.
Tags fetch complete.
Computed the next tag as: v1.0.0.0
I would expect to see v1.0.0
, or something with 3 numbers. AFAIK having 4 numbers is not valid semver.
The code seems to be appending an extra zero to all initial tags:
Line 52 in f621c5c
In case this is the intended behavior, can you explain why?
As demonstrated in the log below, the command was run with prerelease_suffix of 'beta', but the suffix used in the computed tag is 'alpha'.
##[group]Run 08233c8
with:
github_token: ***
version_scheme: semantic
version_type: prerelease
prerelease_suffix: beta
env:
GITHUB_TOKEN: ***
##[endgroup]
Computing the next tag based on: v0.1.0-alpha.5
Computed the next tag as: v0.1.0-alpha.6
I'm attempting to grab the previous tag from the repository, this is my understanding of how I would do that. I have a 'v1.1.1' tag about 10 commits back.
- name: Get tag if branch push.
if: github.event_name == 'push' && !contains(github.ref, 'tags')
id: compute_tag
uses: craig-day/compute-tag@v9
with:
github_token: ${{ github.token }}
version_scheme: semantic
- name: Add old version number if branch push.
if: github.event_name == 'push' && !contains(github.ref, 'tags')
uses: cschleiden/replace-tokens@v1
with:
files: '["asconfig.release.json"]'
env:
VERSION: ${{ steps.compute_tag.outputs.previous_tag }}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.