Release Tag #243
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: "Release Tag" | |
| on: | |
| workflow_run: | |
| workflows: [ "Release Master" ] | |
| types: | |
| - completed | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 'Get Previous tag' | |
| id: previoustag | |
| uses: WyriHaximus/github-action-get-previous-tag@v1 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Maven package | |
| run: mvn clean package -DskipTests | |
| - name: Generate zip | |
| run: | | |
| zip nfe.zip target/*.jar | |
| - name: Create release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.previoustag.outputs.tag }} | |
| release_name: Release ${{ steps.previoustag.outputs.tag }} | |
| draft: false | |
| prerelease: false | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: nfe.zip | |
| asset_name: nfe.zip | |
| asset_content_type: application/zip |