Skip to content

Commit 11ef3b2

Browse files
authored
Enhancement: Add workflow for creating release and uploading rele… (#23)
1 parent e038ebd commit 11ef3b2

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Continuous Deployment"
4+
5+
on:
6+
push:
7+
tags:
8+
- "**"
9+
10+
jobs:
11+
release:
12+
name: "Release"
13+
14+
runs-on: "ubuntu-latest"
15+
16+
steps:
17+
- name: "Checkout"
18+
uses: "actions/checkout@v2"
19+
20+
- name: "Determine tag"
21+
id: "determine-tag"
22+
run: "echo \"::set-output name=tag::${GITHUB_REF#refs/tags/}\""
23+
24+
- name: "Create release"
25+
id: "create-release"
26+
uses: "actions/create-release@v1"
27+
env:
28+
GITHUB_TOKEN: "${{ secrets.STAABM_TOKEN }}"
29+
with:
30+
draft: false
31+
prerelease: false
32+
release_name: "${{ steps.determine-tag.outputs.tag }}"
33+
tag_name: "${{ steps.determine-tag.outputs.tag }}"
34+
35+
- name: "Upload cs2pr"
36+
uses: "actions/upload-release-asset@v1"
37+
env:
38+
GITHUB_TOKEN: "${{ secrets.STAABM_TOKEN }}"
39+
with:
40+
asset_content_type: "text/plain"
41+
asset_name: "cs2pr"
42+
asset_path: "cs2pr"
43+
upload_url: "${{ steps.create-release.outputs.upload_url }}"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Annotate a Pull Request based on a Checkstyle XML-report
22

33
[![Continuous Integration](https://github.com/staabm/annotate-pull-request-from-checkstyle/workflows/Continuous%20Integration/badge.svg)](https://github.com/staabm/annotate-pull-request-from-checkstyle/actions)
4+
[![Continuous Deployment](https://github.com/staabm/annotate-pull-request-from-checkstyle/workflows/Continuous%20Deployment/badge.svg)](https://github.com/staabm/annotate-pull-request-from-checkstyle/actions)
45

56
Turns [checkstyle based XML-Reports](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/checkstyle.xsd) into Github Pull Request [Annotations via the Checks API](https://developer.github.com/v3/checks/).
67
This script is meant for use within your GithubAction.

0 commit comments

Comments
 (0)