From fa7f0c1e68acb33aed2def70b4fa45fc6f63a5fb Mon Sep 17 00:00:00 2001 From: Lewis Chambers Date: Thu, 30 May 2024 13:56:48 +0100 Subject: [PATCH] Testing release tagging --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 7 ++----- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..deda14b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Create release + +on: + push: + branches: ["main"] + +permissions: + contents: write + +jobs: + release: + name: Release pushed tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install . + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + run: | + tag=$(python -c "import iotdevicesimulator; print(iotdevicesimulator.__version__)") + echo $tag + gh release create "$tag" \ + --repo="$GITHUB_REPOSITORY" \ + --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ + --generate-notes \ No newline at end of file diff --git a/.gitignore b/.gitignore index e0d7f21..9fc6848 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -.python/* -.pytest/* -.vscode/* .*/* **/__pycache__/* *.docx @@ -12,6 +9,6 @@ config.cfg aws-auth *.log *.certs - +!.github/* docs/source/* -docs/_* \ No newline at end of file +docs/_*