Embedded Lib Conan Package #15
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
| name: Conan Package | |
| on: | |
| push: | |
| tags: [ "v*" ] | |
| workflow_dispatch: | |
| 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 | |
| - 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 profile detect --force | |
| conan create . --user=${{ github.repository_owner }} --channel=stable | |
| env: | |
| CONAN_REF_VERSION: ${{ steps.vars.outputs.version }} | |
| - name: Upload Conan package | |
| run: | | |
| conan upload "*/${{ steps.vars.outputs.version }}@" --remote=github --confirm | |
| env: | |
| CONAN_LOGIN_USERNAME: ${{ github.actor }} | |
| CONAN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |