Create REPOSITORY_PATH env. #174
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- master | |
# - develop | |
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 }} |