[changed] Dockerfile changed to trigger pipeline #8
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: Conan Package | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ "v*" ] # Nur Tags, die mit v beginnen (z.B. v1.2.3) | |
| pull_request: | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/${{ github.repository_owner }}/embedded-lib-dev:latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # wichtig, damit Tags verfügbar sind | |
| # Version aus Git-Tag ableiten | |
| - name: Extract version from tag | |
| id: vars | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG#v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Check environment | |
| run: | | |
| conan --version | |
| cmake --version | |
| gcc --version | |
| - name: Configure Conan remote | |
| run: | | |
| conan remote add github "https://conan.pkg.github.com/${{ github.repository_owner }}" --force | |
| conan remote list | |
| env: | |
| CONAN_LOGIN_USERNAME: ${{ github.actor }} | |
| CONAN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Conan package | |
| run: | | |
| conan create . --version=${{ steps.vars.outputs.version }} --user=${{ github.actor }} --channel=stable | |
| - name: Upload Conan package | |
| run: | | |
| conan upload "*/${{ steps.vars.outputs.version }}@" --all -r=github --confirm | |
| env: | |
| CONAN_LOGIN_USERNAME: ${{ github.actor }} | |
| CONAN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |