Workflow file for this run
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
| on: | |
| release: | |
| types: | |
| - published | |
| env: | |
| REGISTRY: ghcr.io | |
| NAMESPACE: weddedmercury15 | |
| IMAGE_NAME: levilamina-server | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: extract-release-notes | |
| uses: ffurrer2/extract-release-notes@v1 | |
| - uses: softprops/action-gh-release@v1 | |
| with: | |
| body: | | |
| ${{ steps.extract-release-notes.outputs.release_notes }} | |
| publish-windows: | |
| permissions: | |
| packages: write | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: get-version | |
| uses: frabert/replace-string-action@v2 | |
| with: | |
| pattern: '^v' | |
| string: ${{ github.event.release.tag_name }} | |
| replace-with: '' | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - run: | | |
| docker build windows -t artifact | |
| - name: Tag image | |
| run: | | |
| docker tag artifact ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ steps.get-version.outputs.replaced }}-windows | |
| docker tag artifact ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:latest-windows | |
| - name: Push to GitHub Packages | |
| run: | | |
| docker push ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ steps.get-version.outputs.replaced }}-windows | |
| docker push ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:latest-windows | |
| publish-wine: | |
| permissions: | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: get-version | |
| uses: frabert/replace-string-action@v2 | |
| with: | |
| pattern: '^v' | |
| string: ${{ github.event.release.tag_name }} | |
| replace-with: '' | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/build-push-action@v5 | |
| with: | |
| context: wine | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ steps.get-version.outputs.replaced }}-wine | |
| ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:latest-wine |