Giter VIP home page Giter VIP logo

compute-tag's People

Contributors

alexpls avatar clong- avatar craig-day avatar dependabot[bot] avatar frederick888 avatar kzajac-zendesk avatar learoyklinginsmith avatar mirrec avatar rbury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

compute-tag's Issues

Upgrade Node.js version from 12 to 16

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

Computed tag based on old tag

This is the run

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

Warning: The `set-output` command is deprecated and will be disabled soon

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.

Not generating the new tag

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

Wrongly computed next tag for semantic patch

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.

Version 15 is broken: it does not compute next tag

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

Computed initial semver tag is invalid

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:

return `${newTag}.0`

In case this is the intended behavior, can you explain why?

prerelease_suffix not applied

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

previous_tag not populated

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 }}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.