Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automatic releases #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
.vscode
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The key features of **Amazing GitHub Template**:
- Automatic cleaning for stale issues and PRs workflow
- Automatic label verification for PRs workflow
- Automatic security code scanning workflow via CodeQL
- Automatic release and pre-release versions on main and develop branches

<details open>
<summary>Additional info</summary>
Expand Down Expand Up @@ -226,3 +227,5 @@ Thanks for these awesome resources that were used during the development of the
- <https://github.com/frenck?tab=repositories>
- <https://docs.github.com/en/discussions/quickstart>
- <https://docs.github.com/en/actions>
- <https://github.com/codacy/git-version>
- <https://github.com/marvinpinto/action-automatic-releases>
32 changes: 32 additions & 0 deletions {{cookiecutter.repo_slug}}/.github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Pre Release Creator
on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Git Version
id: get-version-info
uses: codacy/git-version@2.2.0
with:
prefix: dev-
release-branch: main
dev-branch: develop

- uses: alice-biometrics/release-creator/@v1.0.5
name: Create a pre release
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
version: '${{ steps.get-version-info.outputs.version }}'
description: 'Pre release development version: ${{ steps.get-version-info.outputs.version }}'
branch: 'develop'
prerelease: 'true'
27 changes: 27 additions & 0 deletions {{cookiecutter.repo_slug}}/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release Creator
on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Git Version
id: get-version-info
uses: codacy/git-version@2.2.0
with:
prefix: v
release-branch: main

- uses: "marvinpinto/action-automatic-releases@latest"
name: Generating release
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.get-version-info.outputs.version }}
prerelease: false
title: "Release: ${{ steps.get-version-info.outputs.version }}"