From 7de9b552a14d2095cf6a5b34b31fd4ff413cb9c1 Mon Sep 17 00:00:00 2001 From: freiser77 Date: Sat, 5 Feb 2022 14:53:29 +0100 Subject: [PATCH] Create automatic release workflow (#311) * Create release.yml * Listing default directory content * Changing zip command. * Changing zip command. * Changing zip command. * Changing zip command. * Changing zip command. * Added workflow for semVer tag creation. * Fixing createTag workflow. * Fixing createTag workflow. * Fixing createTag workflow. * Added gitVersion/setup step. * Unified release workflow. * Unified release workflow. * Fixing build. * Fixing build. * Split the workflow again. * Added release workflow. * Fixing build. * Fixing build. * Fixing build. * Fixing build. * Fixing build. Co-authored-by: Florian Reiser --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..90c0570 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Package guidanceSteering mod + run: zip -r -v FS22_guidanceSteering.zip . -x .idea data .\* zip.bat zip-builder.ps1 + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v0.9.7 + with: + versionSpec: '5.x' + + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v0.9.7 + + - name: Create git tag + run: git tag $GITVERSION_SEMVER + + - name: Push to repository + run: git push --tags + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: FS22_guidanceSteering.zip + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.gitversion.outputs.semVer }}