Skip to content

Commit 5344118

Browse files
authored
Merge pull request #135 from scribd/DEVPLAT-2566-migrate-to-github-actions
[DEVPLAT-2566] Use semantic-release action instead of image
2 parents a39280c + 9b42522 commit 5344118

File tree

1 file changed

+12
-39
lines changed

1 file changed

+12
-39
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,53 +15,26 @@ permissions:
1515
jobs:
1616
release:
1717
name: Release
18-
runs-on: ubuntu-20.04
19-
needs: []
18+
runs-on: ubuntu-latest
2019
steps:
2120
- name: Checkout
22-
# A GitHub Action to checkout a repository.
23-
# https://github.com/actions/checkout
2421
uses: actions/checkout@v4
2522
with:
26-
token: ${{ secrets.GITHUB_TOKEN }}
2723
persist-credentials: false
2824

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
25+
- name: Semantic Release
26+
uses: cycjimmy/semantic-release-action@v4
3627
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
28+
semantic_version: 24.0.0
29+
extra_plugins: |
30+
@semantic-release/[email protected]
31+
@semantic-release/[email protected]
32+
@semantic-release/[email protected]
33+
@semantic-release/[email protected]
34+
@semantic-release/[email protected]
35+
@semantic-release/[email protected]
4536
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 }}
37+
GITHUB_TOKEN: ${{ secrets.SCRIBD_GITHUB_RELEASE_TOKEN }}
6538

6639
- name: Send Slack notification
6740
if: always()

0 commit comments

Comments
 (0)