Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Add release GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Krawczyk committed Oct 30, 2022
1 parent 453c7b6 commit b86462b
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/release.yaml
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 }}"
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
** Calling process PID is now used as the `task_id` attribute in TACACS+ accounting session. This replaces
an overengineered cryptographically random tasks identifiers.

1.6.2
* SigStore signed releases

1.6.1
* Fixed security issue (CVE-2020-27743) which could result in packet encryption operate uninitialized in case of RAND_bytes() failure

Expand Down

0 comments on commit b86462b

Please sign in to comment.