diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75ada3e..7b5fc72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,12 @@ name: release +permissions: + contents: write + on: - release: - types: [ published ] + push: + tags: + - 'v*' jobs: release: @@ -44,4 +48,35 @@ jobs: VERSION=${{ steps.meta.outputs.version }} push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + + create-release: + name: Create release + runs-on: ubuntu-latest + needs: release + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: create release + run: gh release create ${{ github.ref_name }} -R $REPO -d --generate-notes + - name: Set new version + run: | + VVER=${{ github.ref_name }} + VER="${VVER//v/}" + sed -i'' -e "s#CURRENT_LINKOS_VERSION#$VER#g" docker-compose.yml + - name: upload + run: gh release upload v0000 -R ${{ github.ref_name }} docker-compose.yml + - name: create release + run: ls + + release-notes: + runs-on: ubuntu-latest + needs: create-release + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + - run: npx changelogithub + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file