Skip to content

Merge pull request #13 from emilcode-dev/feature/ghaction-publish-pac… #20

Merge pull request #13 from emilcode-dev/feature/ghaction-publish-pac…

Merge pull request #13 from emilcode-dev/feature/ghaction-publish-pac… #20

Workflow file for this run

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 $JFROG_TOKEN emilcode-conan ephraim.eckl@posteo.de
env:
JFROG_TOKEN: ${{ secrets.JFROG_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