Skip to content

Commit

Permalink
Fix release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
egvimo committed Jan 3, 2021
1 parent 76cb5d9 commit c5df154
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,30 @@ jobs:
- name: Install dependencies
run: pip3 install -r requirements.txt

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Run the Ansible Galaxy release playbook
run: ansible-playbook -i 'localhost,' release.yml -e "github_ref=${{ github.ref }}"
run: ansible-playbook -i 'localhost,' release.yml -e "version=${{ steps.get_version.outputs.VERSION }}"

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./egvimo-general-${{ github.ref }}.tar.gz
asset_name: egvimo-general-${{ github.ref }}.tar.gz
asset_path: ./egvimo-general-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_name: egvimo-general-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_content_type: application/gzip
2 changes: 0 additions & 2 deletions release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
- hosts: localhost
connection: local
gather_facts: false
vars:
version: "{{ github_ref }}"

pre_tasks:
- name: Ensure the ANSIBLE_GALAXY_API_KEY environment variable is set
Expand Down

0 comments on commit c5df154

Please sign in to comment.