-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.1 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
name: Release
on: # yamllint disable-line rule:truthy
push:
tags: ['*']
jobs:
validate-yaml:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- uses: bluwy/substitute-string-action@v1
id: sub
with:
_input-file: .gitlab-ci.yml
_output-file: .dist/.gitlab-ci.yml
master: ${{ steps.get_version.outputs.VERSION }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: .dist/.gitlab-ci.yml
asset_name: .gitlab-ci.yml
tag: ${{ github.ref }}
overwrite: true