Skip to content

Commit

Permalink
The release
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavomaedo committed Jul 6, 2023
1 parent ecaa332 commit 23bdd63
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

name: Release
on:
push:
branches: [ main ]
tags-ignore:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo VERSION=$((${{ github.run_number }})) >> $GITHUB_ENV

- uses: actions/checkout@v3
- name: Create a Release
uses: apptimedev/github-actions-release@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
version: v${{ env.VERSION }}
description: Release version - ${{ env.VERSION }}
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
# github-actions-release
Create GitHub Release with GitHub Actions.

[![Actions Status](https://github.com/apptimedev/github-actions-release/workflows/Release/badge.svg)](https://github.com/apptimedev/github-actions-release/actions)

Creates a GitHub Release with GitHub Actions.

## Usage

```yaml
name: Publish Release
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create a Release
uses: apptimedev/github-actions-release@v3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
version: v1.0.0
description: My Release
```
24 changes: 24 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Github Release"
author: "Apptime Developers"
branding:
icon: "git-branch"
color: "gray-dark"
description: "Publish Github releases from an action"

inputs:
version:
description: "The version of the release to publish"
required: true

description:
description: "The description of the release to publish"
required: true

runs:
using: 'composite'
steps:
- run: $GITHUB_ACTION_PATH/entrypoint.sh
shell: bash
env:
INPUT_VERSION: ${{ inputs.version }}
INPUT_DESCRIPTION: ${{ inputs.description }}
2 changes: 2 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
gh release create "${INPUT_VERSION}" --notes "${INPUT_DESCRIPTION}"

0 comments on commit 23bdd63

Please sign in to comment.