Improve build and release system. (#2)

This commit is contained in:
Lukasz Raczylo
2021-04-04 01:27:02 +01:00
committed by GitHub
parent d116f35858
commit 4508a46ac5
2 changed files with 29 additions and 20 deletions
+14 -15
View File
@@ -34,27 +34,27 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Run unit tests
uses: cedrickring/[email protected]
- name: Setup GoLang
uses: actions/setup-go@v2
with:
args: |
make prepare;
make test CI_RUN=${CI}
- name: Codecov integration
continue-on-error: true
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.txt
stable: 'true'
- name: Test code
run: |
git config --global url."https://${{ secrets.GHCR_TOKEN }}:[email protected]/${{ github.repository_owner }}".insteadOf "https://github.com/${{ github.repository_owner }}";
make test CI_RUN=${CI}
release:
name: Create Release
runs-on: ubuntu-latest
needs: [ prepare, tests ]
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get list of the commits since last release
run: |
echo "$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%h %s")" > .release_notes
- name: Create Release
id: create_release
uses: actions/create-release@main
@@ -63,7 +63,6 @@ jobs:
with:
tag_name: v${{ needs.prepare.outputs.RELEASE_VERSION }}
release_name: v${{ needs.prepare.outputs.RELEASE_VERSION }}
body: |
Released automatically after merge to master / main.
body_path: .release_notes
draft: false
prerelease: false
prerelease: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }}