Merge pull request #12 from emilcode-dev/feature/ghaction-publish-pac… #18
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: Embedded Lib 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 emilcode-conan https://emilcodedev.jfrog.io/artifactory/api/conan/emilcode-conan | |
| conan remote login -p $JFORG_TOKEN emilcode-conan ephraim.eckl@posteo.de | |
| env: | |
| JFORG_TOKEN: ${{ secrets.JFORG_CONAN }} | |
| - name: Create Conan package | |
| run: | | |
| conan profile detect --force | |
| conan create . --build=missing | |
| env: | |
| CONAN_REF_VERSION: ${{ steps.vars.outputs.version }} | |
| - name: Upload Conan package | |
| run: conan upload "*" --remote=emilcode-conan --confirm |