├── .dockerignore ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ ├── feature_request.md │ └── other.md ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── main.yml │ └── versioning.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── action.yml ├── entrypoint.sh └── media └── Discord-Logo.svg /.dockerignore: -------------------------------------------------------------------------------- 1 | # Order ignore, include 2 | * 3 | 4 | # Files required for the action 5 | !entrypoint.sh 6 | !action.yml 7 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: game-ci 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # replace with a single OpenCollective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | --- 8 | 9 | **Bug description** 10 | 11 | 12 | 13 | **How to reproduce** 14 | 15 | 16 | 17 | - 18 | 19 | **Expected behavior** 20 | 21 | 22 | 23 | **Additional details** 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Discuss on Discord 4 | url: https://game.ci/discord 5 | about: Join our Discord community 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an improvement, or a new feature 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | 9 | **Context** 10 | 11 | 12 | 13 | **Suggested solution** 14 | 15 | 16 | 17 | **Considered alternatives** 18 | 19 | 20 | 21 | **Additional details** 22 | 23 | 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other 3 | about: Everything else 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | #### Changes 2 | 3 | - ... 4 | 5 | #### Checklist 6 | 7 | 8 | 9 | - [x] Read the contribution [guide](../CONTRIBUTING.md) and accept the [code](../CODE_OF_CONDUCT.md) of conduct 10 | - [ ] Readme (updated or not needed) 11 | - [ ] Tests (added, updated or not needed) 12 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Actions 😎 2 | on: 3 | pull_request: {} 4 | push: { branches: [main] } 5 | 6 | jobs: 7 | activateAndThenReturnLicense: 8 | name: returnLicense 🎈 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | # Checkout repository (required to test local actions) 13 | - name: Checkout repository 14 | uses: actions/checkout@v3 15 | 16 | # Activate Unity 17 | - name: Activate Unity 18 | uses: game-ci/unity-activate@v1.3 19 | env: 20 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} 21 | 22 | # Return License 23 | - name: Return license 24 | uses: ./ 25 | if: always() 26 | -------------------------------------------------------------------------------- /.github/workflows/versioning.yml: -------------------------------------------------------------------------------- 1 | name: Versioning 2 | 3 | on: 4 | release: 5 | types: [published, edited] 6 | 7 | jobs: 8 | updateMajorTag: 9 | name: Update major tag 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: Actions-R-Us/actions-tagger@v2 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | - Using welcoming and inclusive language 18 | - Being respectful of differing viewpoints and experiences 19 | - Gracefully accepting constructive criticism 20 | - Focusing on what is best for the community 21 | - Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | - The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | - Trolling, insulting/derogatory comments, and personal or political attacks 28 | - Public or private harassment 29 | - Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | - Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at webber@takken.io. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## How to Contribute 4 | 5 | #### Code of Conduct 6 | 7 | This repository has adopted the Contributor Covenant as it's 8 | Code of Conduct. It is expected that participants adhere to it. 9 | 10 | #### Proposing a Change 11 | 12 | If you are unsure about whether or not a change is desired, 13 | you can create an issue. This is useful because it creates 14 | the possibility for a discussion that's visible to everyone. 15 | 16 | When fixing a bug it is fine to submit a pull request right away. 17 | 18 | #### Sending a Pull Request 19 | 20 | Steps to be performed to submit a pull request: 21 | 22 | 1. Fork the repository and create your branch from `master`. 23 | 2. Make the desired changes 24 | 3. Fill out the description, link any related issues and submit your pull request. 25 | 26 | #### Pull Request Prerequisites 27 | 28 | None 29 | 30 | #### License 31 | 32 | By contributing to this repository, you agree that your contributions will be licensed under its MIT license. 33 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM unityci/editor:ubuntu-2019.2.11f1-base-1 2 | 3 | LABEL "com.github.actions.name"="Unity - Return License" 4 | LABEL "com.github.actions.description"="Return a Unity Pro license and free up a spot towards the maximum number of active licenses." 5 | LABEL "com.github.actions.icon"="box" 6 | LABEL "com.github.actions.color"="gray-dark" 7 | 8 | LABEL "repository"="http://github.com/webbertakken/unity-actions" 9 | LABEL "homepage"="http://github.com/webbertakken/unity-actions" 10 | LABEL "maintainer"="Webber Takken " 11 | 12 | ADD entrypoint.sh /entrypoint.sh 13 | RUN chmod +x /entrypoint.sh 14 | ENTRYPOINT ["/entrypoint.sh"] 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-present Webber Takken 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity - Return license 2 | 3 | (Not affiliated with Unity Technologies) 4 | 5 | GitHub Action to [return a Unity license](https://github.com/marketplace/actions/unity-return-license). 6 | Part of the GameCI open source project. 7 |
8 |
9 | 10 | [![Actions status](https://github.com/game-ci/unity-return-license/actions/workflows/main.yml/badge.svg)](https://github.com/game-ci/unity-return-license/actions/workflows/main.yml) 11 |
12 |
13 | 14 | ## How to use 15 | 16 | Find the 17 | [docs](https://game.ci/docs/github/returning-a-license) 18 | on the GameCI 19 | [documentation website](https://game.ci/docs). 20 | 21 | ## Related actions 22 | 23 | Visit the 24 | GameCI Unity Actions 25 | status repository for related Actions. 26 | 27 | ## Community 28 | 29 | Feel free to join us on 30 | Discord 31 | and engage with the community. 32 | 33 | ## Contributing 34 | 35 | To help improve the documentation, please find the docs [repository](https://github.com/game-ci/documentation). 36 | 37 | To contribute to this project, kindly read the [contribution guide](./CONTRIBUTING.md). 38 | 39 | ## Licence 40 | 41 | [MIT](./LICENSE) 42 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Unity - Return License' 2 | author: Webber Takken 3 | description: 'Return a Unity Pro license and free up a spot towards the maximum number of active licenses.' 4 | inputs: {} 5 | outputs: {} 6 | runs: 7 | using: 'docker' 8 | image: 'Dockerfile' 9 | branding: 10 | icon: 'box' 11 | color: 'gray-dark' 12 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ -n "$UNITY_SERIAL" ]]; then 4 | # 5 | # PROFESSIONAL (SERIAL) LICENSE MODE 6 | # 7 | # This will return the license that is currently in use. 8 | # 9 | unity-editor \ 10 | -logFile /dev/stdout \ 11 | -quit \ 12 | -returnlicense 13 | else 14 | echo "No UNITY_SERIAL detected! No license was returned." 15 | fi 16 | -------------------------------------------------------------------------------- /media/Discord-Logo.svg: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------