Skip to content

Commit d7344ce

Browse files
committed
chore: Use semantic-release action instead of image
1 parent a39280c commit d7344ce

File tree

1 file changed

+12
-49
lines changed

1 file changed

+12
-49
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,29 @@ name: Release
22

33
on: workflow_dispatch
44

5-
env:
6-
AWS_REGION: us-east-2
7-
DOCKER_BUILDKIT: 1
8-
DOCKER_CACHE_PATH: ${{ github.workspace }}/tmp/docker-cache
9-
10-
permissions:
11-
id-token: write
12-
contents: read
13-
actions: read
14-
155
jobs:
166
release:
177
name: Release
18-
runs-on: ubuntu-20.04
19-
needs: []
8+
runs-on: ubuntu-latest
209
steps:
2110
- name: Checkout
22-
# A GitHub Action to checkout a repository.
23-
# https://github.com/actions/checkout
2411
uses: actions/checkout@v4
2512
with:
26-
token: ${{ secrets.GITHUB_TOKEN }}
2713
persist-credentials: false
2814

29-
- name: Inject slug/short variables
30-
# A GitHub Action to expose the slug values of some GitHub ENV variables
31-
# https://github.com/rlespinasse/github-slug-action
32-
uses: rlespinasse/[email protected]
33-
34-
- name: Configure AWS credentials
35-
uses: aws-actions/configure-aws-credentials@v4
15+
- name: Semantic Release
16+
uses: cycjimmy/semantic-release-action@v4
3617
with:
37-
role-to-assume: ${{ secrets.DEPLOYER_PRODUCTION_ROLE_ARN }}
38-
aws-region: ${{ env.AWS_REGION }}
39-
40-
- name: Login to Amazon ECR
41-
id: login-ecr
42-
uses: aws-actions/amazon-ecr-login@v2
43-
44-
- name: Create release
18+
semantic_version: 24.0.0
19+
extra_plugins: |
20+
@semantic-release/[email protected]
21+
@semantic-release/[email protected]
22+
@semantic-release/[email protected]
23+
@semantic-release/[email protected]
24+
@semantic-release/[email protected]
25+
@semantic-release/[email protected]
4526
env:
46-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
47-
ECR_REPOSITORY: scribd/semantic-release
48-
run: |
49-
docker pull $ECR_REGISTRY/$ECR_REPOSITORY:latest
50-
docker run --rm \
51-
-v ${{ github.workspace }}:/src \
52-
-w /src \
53-
-e CI=true \
54-
-e GITHUB_ACTIONS=true \
55-
-e GITHUB_TOKEN=${{ secrets.SCRIBD_GITHUB_RELEASE_TOKEN }} \
56-
-e GITHUB_REPOSITORY=${{ github.repository }} \
57-
-e GITHUB_WORKSPACE=${{ github.workspace }} \
58-
-e GITHUB_SHA=${{ github.sha }} \
59-
-e GITHUB_REF=${{ github.ref }} \
60-
$ECR_REGISTRY/$ECR_REPOSITORY:latest --publish
61-
62-
- name: Logout of Amazon ECR
63-
if: always()
64-
run: docker logout ${{ steps.login-ecr.outputs.registry }}
27+
GITHUB_TOKEN: ${{ secrets.SCRIBD_GITHUB_GENERIC_TOKEN }}
6528

6629
- name: Send Slack notification
6730
if: always()

0 commit comments

Comments
 (0)