Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publish release and to GitHub Actions Marketplace #41

Merged
merged 11 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# E2E test cases on Notation: Setup
# E2E test cases on Notation Setup
- name: Setup Notation
uses: ./setup

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
notation cert generate-test "e2e-test"

# E2E test cases on Notation: Sign
# E2E test cases on Notation Sign
- name: Sign artifact using notation plugin
uses: ./sign
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
plugin_config: |-
keyFile=${{ env.E2E_KEY }}

# E2E test cases on Notation: Verify
# E2E test cases on Notation Verify
- name: Verify released artifact
uses: ./verify
with:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/update-major-and-minor-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright The Notary Project Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Update major and minor tags

on:
release:
types: [published]

jobs:
update-major-minor-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Git config
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Tag and push new major and minor versions
run: |
VERSION=${{ github.event.release.tag_name }}
MAJOR=$(echo ${VERSION} | cut -d '.' -f 1)
Two-Hearts marked this conversation as resolved.
Show resolved Hide resolved
MINOR=${MAJOR}.$(echo ${VERSION} | cut -d '.' -f 2)
if [ -z ${VERSION} ]
then
echo "released tag cannot be empty"
exit 1
else
echo "released tag is ${VERSION}"
fi
if [ -z ${MAJOR} ]
then
echo "major tag cannot be empty"
exit 1
else
echo "major tag is ${MAJOR}"
fi
if [ -z ${MINOR} ]
then
echo "minor tag cannot be empty"
exit 1
else
echo "minor tag is ${MINOR}"
fi
git tag -f ${MAJOR} ${VERSION}
git tag -f ${MINOR} ${VERSION}
git push origin ${MAJOR} --force
git push origin ${MINOR} --force
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following three actions are available:

## Usage

### Notation: Setup
### Notation Setup
```yaml
- name: setup Notation CLI
uses: notaryproject/notation-action/setup@main
Expand All @@ -29,7 +29,7 @@ For example,
version: "1.0.0"
```

### Notation: Sign
### Notation Sign
```yaml
- name: sign releasd artifact with signing plugin
uses: notaryproject/notation-action/sign@main
Expand Down Expand Up @@ -77,7 +77,7 @@ Example of using the [Referrers API](https://github.com/opencontainers/distribut
self_signed=false
```

### Notation: Verify
### Notation Verify
```yaml
- name: verify released artifact
uses: notaryproject/notation-action/verify@main
Expand Down
32 changes: 32 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright The Notary Project Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Notation Setup'
description: Set up Notation CLI on GitHub Action runners for signing and verifying OCI artifacts
branding:
icon: shield
color: blue
inputs:
version:
description: version of official Notation CLI [release](https://github.com/notaryproject/notation/releases). This field is ignored if 'url' is present.
required: false
default: "1.0.0"
url:
description: url of customized Notation CLI to install
required: false
checksum:
description: SHA256 of the customized Notation CLI. Required if 'url' is present.
required: false
runs:
using: node16
main: ./dist/setup.js
6 changes: 3 additions & 3 deletions setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Notation: Setup'
description: Setup Notation CLI on GitHub Action runners
name: 'Notation Setup'
description: Set up Notation CLI on GitHub Action runners for signing and verifying OCI artifacts
branding:
icon: check-circle
icon: shield
color: blue
inputs:
version:
Expand Down
4 changes: 2 additions & 2 deletions sign/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Notation: Sign'
name: 'Notation Sign'
description: notation sign target artifact with plugin
branding:
icon: check-circle
icon: shield
color: blue
inputs:
plugin_name:
Expand Down
4 changes: 2 additions & 2 deletions verify/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Notation: Verify'
name: 'Notation Verify'
description: notation verify target artifact
branding:
icon: check-circle
icon: shield
color: blue
inputs:
target_artifact_reference:
Expand Down
Loading