Skip to content

Update VERSION

Update VERSION #116

name: Create tagged release
on:
push:
paths:
- 'VERSION'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Set env
run: echo "RELEASE_VERSION=$(<VERSION)" >> $GITHUB_ENV
- name: Push a new tag
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag "${{ env.RELEASE_VERSION }}"
git push origin --tags
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: Release ${{ env.RELEASE_VERSION }}+${{ github.sha:0:6 }}

Check failure on line 31 in .github/workflows/build_and_publish.yml

View workflow run for this annotation

GitHub Actions / Create tagged release

Invalid workflow file

The workflow is not valid. .github/workflows/build_and_publish.yml (Line: 31, Col: 25): Unexpected symbol: 'sha:0:6'. Located at position 8 within expression: github.sha:0:6
draft: false
prerelease: false
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=$(<VERSION)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{secrets.HUB_USERNAME}}
password: ${{secrets.HUB_PASSWORD}}
- name: Login to Alibaba Cloud Container Registry (ACR)
uses: docker/login-action@v3
with:
username: ${{secrets.CLOUD_USERNAME}}
password: ${{secrets.CLOUD_PASSWORD}}
registry: registry.cn-hangzhou.aliyuncs.com
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
silianz/python-openbmclapi:latest
silianz/python-openbmclapi:${{env.RELEASE_VERSION}}
registry.cn-hangzhou.aliyuncs.com/silianz/python-openbmclapi:latest
registry.cn-hangzhou.aliyuncs.com/silianz/python-openbmclapi:${{env.RELEASE_VERSION}}
platforms: linux/amd64, linux/arm64