| 1 | name: Build and Release |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | tags: |
| 6 | - 'v*.*.*' |
| 7 | |
| 8 | jobs: |
| 9 | build: |
| 10 | runs-on: ubuntu-latest |
| 11 | |
| 12 | steps: |
| 13 | - name: Checkout code |
| 14 | uses: actions/checkout@v6 |
| 15 | |
| 16 | - name: Build binary |
| 17 | run: | |
| 18 | mkdir -p release/ |
| 19 | docker build -t podman-compose-bin -v "$PWD/release:/result" . |
| 20 | mv "$PWD/release/podman-compose" "$PWD/release/podman-compose-linux-x86" |
| 21 | |
| 22 | - name: Upload release asset |
| 23 | uses: softprops/action-gh-release@v3 |
| 24 | with: |
| 25 | files: ./release/podman-compose-linux-x86 |
| 26 | env: |
| 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |