GithubHelp home page GithubHelp logo

unity-version-bump's Introduction

Unity Version Bump integration test status unit test status codecov

Creates pull requests for outdated Unity Editor and UPM package versions.

Usage

Simply add this file as .github/workflows/unityVersionCheck.yml.
It's is an opinionated example which

name: Check for new Unity version
on:
  schedule:
    - cron: "* 3 * * *"

jobs:
  updateCheck:
    name: Create PR for newer Unity version
    runs-on: ubuntu-latest
    steps:
      - name: Checkout your repository
        uses: actions/checkout@v2

      - name: Create PR if needed
        uses: ViMaSter/unity-version-bump@v1
        with:
          releaseStreams: Stable,LTS
          githubToken: ${{ secrets.GITHUB_TOKEN }}

Advanced usage

My Unity project is inside a subdirectory of my repository

Assuming Unity's Assets directory resides at [YOUR_REPOSITORY_ROOT]/projects/my-game/Assets, add the unityProjectPath input parameter as follows:

- name: Create PR if needed
  uses: ViMaSter/unity-version-bump@v1
  with:
    unityProjectPath: projects/my-game # <-- add this line
    releaseStreams: Stable,LTS
    githubToken: ${{ secrets.GITHUB_TOKEN }}
Also creating PRs for alpha/beta stream releases

The releaseStreams parameter accepts a comma-separated list of the following values in any order:

  • Alpha
  • Beta
  • Stable
  • LTS
  • Patch

This parameter has no default and needs to be set to at least one release stream.

To include beta stream releases next to regular releases...

- name: Create PR if needed
  uses: ViMaSter/unity-version-bump@v1
  with:
    releaseStreams: Stable,LTS,Beta # <-- set this line
    githubToken: ${{ secrets.GITHUB_TOKEN }}

To include alpha and beta stream releases next to regular releases...

- name: Create PR if needed
  uses: ViMaSter/unity-version-bump@v1
  with:
    releaseStreams: Stable,LTS,Beta,Alpha # <-- set this line
    githubToken: ${{ secrets.GITHUB_TOKEN }}
Get notified for only long-term support (LTS) stream releases

The releaseStreams parameter accepts a comma-separated list of the following values in any order:

  • Alpha
  • Beta
  • Stable
  • LTS
  • Patch

This parameter has no default and needs to be set to at least one release stream.

- name: Create PR if needed
  uses: ViMaSter/unity-version-bump@v1
  with:
    releaseStreams: LTS # <-- set this line
    githubToken: ${{ secrets.GITHUB_TOKEN }}

To only include beta stream releases

- name: Create PR if needed
  uses: ViMaSter/unity-version-bump@v1
  with:
    releaseStreams: Beta # <-- set this line
    githubToken: ${{ secrets.GITHUB_TOKEN }}
Highlighting pull requests created by this action (using labels)

The pullRequestLabels parameter accepts a comma-separated list of labels.

Make sure each label exists as valid label for your repository. Labels missing here, might not be added or cause this action to fail.

To add a "dependencies" label to each created pull request...

- name: Create PR if needed
  uses: ViMaSter/unity-version-bump@v1
  with:
    pullRequestLabels: dependencies # <-- set this line
    releaseStreams: Stable,LTS
    githubToken: ${{ secrets.GITHUB_TOKEN }}

To add a "dependencies" and "unity" label to each created pull request...

- name: Create PR if needed
  uses: ViMaSter/unity-version-bump@v1
  with:
    pullRequestLabels: dependencies,unity # <-- set this line
    releaseStreams: Stable,LTS
    githubToken: ${{ secrets.GITHUB_TOKEN }}
Using generated data like the current Unity version, newest Unity version or pull request ID in another action

This action creates the following output parameters:

Output parameter... ...which describes... ...is set when... Example value
has-newer-version Whether or not a newer version of Unity exists inside the specified release streams Always True / False
current-unity-version The version of Unity currently used inside this repository Always 2020.3.15f2
newest-unity-version The newest version of Unity available inside the specified release streams If newer Unity Version is available 2021.3.0f1
pull-request-id The ID of the pull request created If newer Unity Version is available 37

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.