Skip to content

Commit 293851f

Browse files
committed
feat: updated README and github actions for download
1 parent 8984263 commit 293851f

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

.github/workflows/.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Download Button Action"
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Get latest release
16+
id: get-latest-release
17+
uses: InsonusK/get-latest-release@v1.0.1
18+
with:
19+
myToken: ${{ github.token }}
20+
view_top: 1
21+
22+
- name: Readme Download Button Action
23+
env:
24+
GITHUB_USER: "codeskills-dev"
25+
REPO: "30-days-of-html"
26+
FORMAT: "zip"
27+
VERSION: "${{ steps.get-latest-release.outputs.tag_name }}"
28+
COLOR: "blue"
29+
BEGIN_TAG: "<!-- BEGIN LATEST DOWNLOAD BUTTON -->"
30+
END_TAG: "<!-- END LATEST DOWNLOAD BUTTON -->"
31+
run: |
32+
UPDATE=$(cat README.md | perl -0777 -pe 's#(${{ env.BEGIN_TAG }})(?:.|\n)*?(${{ env.END_TAG }})#${1}\n[![Download ${{ env.FORMAT }}](https://custom-icon-badges.herokuapp.com/badge/-Download-${{ env.COLOR }}?style=for-the-badge&logo=download&logoColor=white "Download ${{ env.FORMAT }}")](https://github.com/${{ env.GITHUB_USER }}/${{ env.REPO }}/archive/${{ env.VERSION }}.${{ env.FORMAT }})\n${2}#g')
33+
echo "${UPDATE}" > README.md
34+
35+
- uses: EndBug/add-and-commit@v7
36+
with:
37+
message: "docs(readme): Bump download button version to ${{ steps.get-latest-release.outputs.tag_name }}"
38+
default_author: github_actions
39+
branch: main

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# 30 Days of HTML🎖️💻
22

33
Welcome to "30 Days of HTML" a repository with HTML challenges for beginners!
4-
<br><br>
5-
![30-days-of-html](https://socialify.git.ci/codeskills-dev/30-days-of-html/image?font=Inter&forks=1&language=1&name=1&pulls=1&stargazers=1&theme=Auto)
4+
<br><br>
5+
![30-days-of-html](https://socialify.git.ci/codeskills-dev/30-days-of-html/image?font=Inter&forks=1&language=1&name=1&pulls=1&stargazers=1&theme=Auto)
66

77
## Overview
88

99
This repository contains 30 HTML challenges that are designed to help beginners improve their HTML skills. Each challenge comes with a description, some basic HTML code to get started, and any instructions or hints that the learner might need.
1010

1111
## How to Use
1212

13-
To get started, simply clone this repository to your local machine and start working on the challenges. You can work through the challenges in order, or jump around to the ones that interest you the most.
13+
<!-- BEGIN LATEST DOWNLOAD BUTTON -->
14+
<!-- END LATEST DOWNLOAD BUTTON -->
15+
16+
To get started, simply download/clone this repository to your local machine and start working on the challenges. You can work through the challenges in order, or jump around to the ones that interest you the most.
1417

1518
Each challenge is contained in its own HTML file, and includes a corresponding solution file. Once you've completed a challenge, you can check your work by comparing your code to the solution file.
1619

0 commit comments

Comments
 (0)