This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pawel Krawczyk
committed
Oct 30, 2022
1 parent
453c7b6
commit b86462b
Showing
2 changed files
with
84 additions
and
0 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,81 @@ | ||
--- | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: version | ||
run: echo "version=$(/usr/bin/basename ${{ github.ref }})" >> $GITHUB_OUTPUT | ||
id: version | ||
|
||
- name: release | ||
uses: actions/create-release@v1 | ||
id: create_release | ||
with: | ||
draft: false | ||
prerelease: false | ||
release_name: ${{ steps.version.outputs.version }} | ||
tag_name: ${{ github.ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Package | ||
uses: a7ul/[email protected] | ||
with: | ||
files: . | ||
command: c | ||
outPath: ${{ steps.version.outputs.version }}.tar.gz | ||
|
||
- name: Sign release with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: ${{ steps.version.outputs.version }}.tar.gz | ||
release-signing-artifacts: true | ||
upload-signing-artifacts: true | ||
|
||
- name: upload signed asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.version.outputs.version }}.tar.gz | ||
asset_name: ${{ steps.version.outputs.version }}.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: upload sigstore certificate | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.version.outputs.version }}.tar.gz.crt | ||
asset_name: ${{ steps.version.outputs.version }}.tar.gz.crt | ||
asset_content_type: application/x-x509-ca-cert | ||
|
||
- name: upload sigstore signature | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.version.outputs.version }}.tar.gz.sig | ||
asset_name: ${{ steps.version.outputs.version }}.tar.gz.sig | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Build and Deploy Collection | ||
uses: 0x022b/[email protected] | ||
with: | ||
galaxy_api_key: "${{ secrets.ANSIBLE_GALAXY_TOKEN }}" |
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