fix: init version #7
This file contains hidden or 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: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-and-release: | |
| name: Build Project and Create Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Get current package version | |
| id: package-version | |
| uses: martinbeentjes/[email protected] | |
| with: | |
| path: mcsmanager/app/server/web | |
| - name: Update version in manifest file | |
| run: | | |
| sed -i "s/version=1.0.0/version=${{ steps.package-version.outputs.current-version }}/" mcsmanager/manifest | |
| - name: Build Package | |
| run: | | |
| chmod +x ./build/fnpack-1.0.4-linux-amd64 | |
| ./build/fnpack-1.0.4-linux-amd64 build mcsmanager | |
| - name: Release | |
| uses: ncipollo/[email protected] | |
| with: | |
| tag: v${{ steps.package-version.outputs.current-version}} | |
| name: v${{ steps.package-version.outputs.current-version}} | |
| body: | | |
| [CHANGELOG](https://github.com/MCSManager/MCSManager/releases/tag/v${{ steps.package-version.outputs.current-version}}) | |
| artifacts: "mcsmanager.fpk" | |
| token: ${{ secrets.GITHUB_TOKEN }} |