🔖 GitHub Action to get the release version and a SHA suffix
Find a file
semantic-release-bot 252330a745 🔖 Release v1.1.1 [skip ci]
2021-05-04 06:20:47 +00:00
.github 👷 Use dispatch for Release CI 2021-05-03 11:45:18 +02:00
.licenses/npm 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
dist 🚀 Deploy new version [skip ci] 2021-05-04 06:07:49 +00:00
src 🐛 Only add release info if found 2021-05-04 08:07:04 +02:00
.gitignore 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
.npmignore 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
.prettierrc.cjs 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
.templaterc.json 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
action.yml 🔧 Update package metadata 2021-01-03 22:46:38 +05:30
CHANGELOG.md 🔖 Release v1.1.1 [skip ci] 2021-05-04 06:20:47 +00:00
jest.config.js 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
LICENSE 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
package-lock.json 🔖 Release v1.1.1 [skip ci] 2021-05-04 06:20:47 +00:00
package.json 🔖 Release v1.1.1 [skip ci] 2021-05-04 06:20:47 +00:00
README.md Add date/hash outputs 2021-05-03 11:37:17 +02:00
release.config.js 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30
tsconfig.json 🎉 Init new @koj-co project 2021-01-03 22:20:59 +05:30

🔖 Package Version Action

GitHub Action to get the latest release version and a SHA suffix for unique versions.

Build CI Test CI Release CI Node CI

Get started

This Action returns a recommend image name. For example, if you want to publish a new Docker image:

name: Docker CI
on:
  workflow_dispatch:
jobs:
  test:
    name: Deploy to Docker
    runs-on: ubuntu-latest
    steps:
      - name: Get package version
        id: package-version
        uses: koj-co/package-version-action@v1.0.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Build and push to Docker
        uses: docker/build-push-action@v2
        with:
          push: true
          tags: username/anand:${{ steps.package-version.outputs.package-version }}
          # ->  username/anand:v1.23.21

Outputs

Output name Description Example value
package-version Latest release version v2.23.1
package-version-timestamp Version + unix timestamp v2.23.1-1609693587
short-hash Last commit hash 1abc9c3
package-version-short-hash Version + commit hash v2.23.1-1abc9c3
package-version-random Version + random string v2.23.1-238a32ef21
date-hash Date + commit hash 2020-12-29-238a32ef21
date-time-hash ISO datetime + commit hash 2020-12-29T09:35:34.759Z-238a32ef21

📄 License

  • Code: MIT © Koj
  • "GitHub" is a trademark of GitHub, Inc.

Koj

An open source project by Koj.
Furnish your home in style, for as low as CHF175/month →