-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from plajusticia/actions
Automatic release with Github Actions
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Ansible Release # feel free to pick your own name | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'galaxy.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Important: This sets up your GITHUB_WORKSPACE environment variable | ||
- uses: actions/checkout@v2 | ||
|
||
- name: building collection | ||
run: ./build_collection.sh | ||
shell: bash | ||
|
||
- name: Generate release tag | ||
id: tag | ||
run: | | ||
echo "::set-output name=release_tag::Version_$(grep -oP '^version: \K.*' ./galaxy.yml)" | ||
- name: Relase new version | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.tag.outputs.release_tag }} | ||
files: ./releases/*.tar.gz | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
ansible-galaxy collection build | ||
|
||
ansible-galaxy collection build --output-path ./releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters