Skip to content

Commit

Permalink
updated build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremycook123 committed Sep 5, 2023
1 parent 3ec7340 commit 745bb0d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
# This is a basic workflow to help you get started with Actions
name: Build

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
tags:
- '*.*.*'
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
branches:
- main
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
- uses: actions/checkout@v2

# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Package
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo packaging...
tar -czf release-${{ env.RELEASE_VERSION }}.tar.gz terraform
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: release-${{ env.RELEASE_VERSION }}
path: release-${{ env.RELEASE_VERSION }}.tar.gz

- name: Make Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release-${{ env.RELEASE_VERSION }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
![Build Status](https://github.com/cloudacademy/stocks-app-eks/actions/workflows/release.yml/badge.svg)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/cloudacademy/stocks-app-eks)

## EKS Cluster and Stocks Cloud Native App Deployment
The following instructions are provided to demonstrate how to provision a new EKS cluster and automatically deploy a fully functional Stocks cloud native web application.

Expand Down

0 comments on commit 745bb0d

Please sign in to comment.