forked from zemuldo/git-crypt-unlock
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.43 KB
/
continuos-integration.yml
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
40
41
42
43
44
45
46
47
48
---
name: Continuous Integration
on:
push:
branches:
- master
- develop
- pre_releases # todo
jobs:
run-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Release version
run: |
echo "BUILD_VERSION=$(cat version.txt).${{ github.run_number }}" >> $GITHUB_ENV
echo "PRE_RELEASE=false" >> $GITHUB_ENV
if: github.ref == 'refs/heads/master'
- name: Beta Release version
run: |
echo "BUILD_VERSION=$(cat version.txt).${{ github.run_number }}-beta" >> $GITHUB_ENV
echo "PRE_RELEASE=true" >> $GITHUB_ENV
# if: github.ref == 'refs/heads/develop'
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git tag -f ${{ env.BUILD_VERSION }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
force: true
tags: true
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ env.BUILD_VERSION }}
release_name: ${{ env.BUILD_VERSION }}
# body: |
# ${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: ${{ env.PRE_RELEASE }}