chore(semrel): remove ::set-env usage (#976)

* chore(semrel): remove ::set-env usage

* test env handling

* test var handling

* var translation

* try it with semrel

* test

* correct indenting

Co-authored-by: Christian Jakob <christian@caos.ch>
This commit is contained in:
Florian Forster 2020-11-17 12:00:46 +01:00 committed by GitHub
parent 84f0e24c63
commit 62682b2daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 13 deletions

View File

@ -65,21 +65,27 @@ jobs:
- name: Docker Pull short-sha
run: docker pull $REGISTRY/$GITHUB_REPOSITORY:${{ steps.vars.outputs.sha_short }}
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
dry_run: false
semantic_version: 17.0.4
extra_plugins: |
@semantic-release/exec@5.0.0
- name: Do something when a new release published
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
- name: Docker Tag Version
run: docker tag $REGISTRY/$GITHUB_REPOSITORY:${{ steps.vars.outputs.sha_short }} $REGISTRY/$GITHUB_REPOSITORY:$CAOS_NEXT_VERSION
if: env.CAOS_NEXT_VERSION != ''
run: docker tag $REGISTRY/$GITHUB_REPOSITORY:${{ steps.vars.outputs.sha_short }} $REGISTRY/$GITHUB_REPOSITORY:${{ steps.semantic.outputs.new_release_version }}
if: steps.semantic.outputs.new_release_published == 'true'
- name: Docker Tag Latest
run: docker tag $REGISTRY/$GITHUB_REPOSITORY:${{ steps.vars.outputs.sha_short }} $REGISTRY/$GITHUB_REPOSITORY:latest
if: env.CAOS_NEXT_VERSION != ''
if: steps.semantic.outputs.new_release_published == 'true'
- name: Docker Push Version
run: docker push $REGISTRY/$GITHUB_REPOSITORY:$CAOS_NEXT_VERSION
if: env.CAOS_NEXT_VERSION != ''
run: docker push $REGISTRY/$GITHUB_REPOSITORY:${{ steps.semantic.outputs.new_release_version }}
if: steps.semantic.outputs.new_release_published == 'true'
- name: Docker Push Latest
run: docker push $REGISTRY/$GITHUB_REPOSITORY:latest
if: env.CAOS_NEXT_VERSION != ''
if: steps.semantic.outputs.new_release_published == 'true'

View File

@ -3,9 +3,6 @@ module.exports = {
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
["@semantic-release/exec", {
"publishCmd": "echo '::set-env name=CAOS_NEXT_VERSION::${nextRelease.version}'"
}],
"@semantic-release/github"
]
};
};