Skip to content

GitHub action to create a new pre-release and delete old pre-releases created by this action

License

Notifications You must be signed in to change notification settings

viperproject/create-nightly-release

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

create-nightly-release

Test Status License: MPL 2.0

GitHub action to create a new pre-release and delete old pre-releases created by this action.

Usage

- name: Create nightly release
  id: create_release
  uses: viperproject/create-nightly-release@v1
  env:
    # This token is provided by Actions, you do not need to create your own token
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    tag_name: ${{ env.TAG_NAME }}
    release_name: Nightly Release ${{ env.TAG_NAME }}
    body: Body for the release
    keep_num: 0
    keep_tags: false

Inputs

  • tag_name: The name of the tag. (required)
  • release_name: The name of the release. For example, 'Release v1.0.1'. (required)
  • body: Text describing the release. (optional)
  • body_path: Path to a file whose content should be used as release body. (optional)
  • keep_num: Number of pre-releases that should be kept in addition to the newly created one. E.g. '0' deletes all previous pre-releases created by this action except the one that was just created. (optional, default: 0)
  • keep_tags: Specifies whether tags should be deleted if the corresponding release is deleted. (optional, default: false)

Outputs

  • id: The ID of the created release.
  • html_url: The URL users can navigate to in order to view the release.
  • upload_url: The URL for uploading assets to the release

Create a new Release

  1. Checkout this repository and pull remote changes git pull
  2. Checkout or create a release branch (replace v1 with the major version number):
  • git checkout releases/v1; git pull origin main or
  • git checkout -b releases/v1
  1. Run npm version <newversion> to set the version number
  2. Run rm -rf dist; rm -rf node_modules; npm ci
  3. Run npm run package
  4. Force add the dist folder: git add -f dist
  5. Commit: git commit -m "<commit message>
  6. Push release branch: git push
  7. Create a GitHub release with a tag, e.g. v1.0.0
  8. Move the major tag (e.g. v1) to the latest release:
git tag -fa v1 -m "Update v1 tag"
git push origin v1 --force

More information

About

GitHub action to create a new pre-release and delete old pre-releases created by this action

Resources

License

Stars

Watchers

Forks