diff --git a/.github/workflows/continuos-integration.yml b/.github/workflows/continuos-integration.yml index 2838e99..d0784b0 100644 --- a/.github/workflows/continuos-integration.yml +++ b/.github/workflows/continuos-integration.yml @@ -5,7 +5,6 @@ on: branches: - master - develop - - release-ci jobs: run-build: runs-on: ubuntu-latest @@ -13,14 +12,32 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Release version + run: echo "BUILD_VERSION=$(cat version.txt).${{ github.run_number }}" >> $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 + 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 v$(cat version.txt) + git tag -f ${{ env.BUILD_VERSION }} - name: Push changes uses: ad-m/github-push-action@master with: branch: ${{ github.ref }} force: true - tags: true \ No newline at end of file + 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: false \ No newline at end of file diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml deleted file mode 100644 index ff2076b..0000000 --- a/.github/workflows/github-release.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Release version in Github -on: - push: - tags: - - "v*" # the action will only work with semantic versioning https://semver.org/ -jobs: - release-new-version: - runs-on: ubuntu-latest - steps: - - name: Release - uses: docker://antonyurchenko/git-release:latest - if: github.ref == 'refs/heads/master' - env: - GITHUB_TOKEN: ${{ github.token }} - RELEASE_NAME_SUFFIX: ".${{ github.run_number }}" - - name: Beta Release - uses: docker://antonyurchenko/git-release:latest - if: github.ref == 'refs/heads/develop' - env: - GITHUB_TOKEN: ${{ github.token }} - RELEASE_NAME_SUFFIX: ".${{ github.run_number }}-beta" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e69de29 diff --git a/version.txt b/version.txt index 8428158..afaf360 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.1.2 \ No newline at end of file +1.0.0 \ No newline at end of file