This commit is contained in:
		@@ -4,18 +4,12 @@ name: release
 | 
				
			|||||||
steps:
 | 
					steps:
 | 
				
			||||||
  - name: create-script-file
 | 
					  - name: create-script-file
 | 
				
			||||||
    image: alpine:3.13
 | 
					    image: alpine:3.13
 | 
				
			||||||
    environment:
 | 
					 | 
				
			||||||
      REPO_OWNER: "insignia-live"
 | 
					 | 
				
			||||||
      REPO_NAME: "setup-assistant-release"
 | 
					 | 
				
			||||||
    commands:
 | 
					    commands:
 | 
				
			||||||
      - echo "const axios = require('axios');" > custom-script.js
 | 
					      - echo "const axios = require('axios');" > custom-script.js
 | 
				
			||||||
      - echo "" >> custom-script.js
 | 
					      - echo "" >> custom-script.js
 | 
				
			||||||
      - echo "function getLatestReleaseTag() {" >> custom-script.js
 | 
					      - echo "function getLatestReleaseTag() {" >> custom-script.js
 | 
				
			||||||
      - echo "  const repoOwner = process.env.REPO_OWNER;" >> custom-script.js
 | 
					 | 
				
			||||||
      - echo "  const repoName = process.env.REPO_NAME;" >> custom-script.js
 | 
					 | 
				
			||||||
      - echo "" >> custom-script.js
 | 
					 | 
				
			||||||
      - echo "  return axios" >> custom-script.js
 | 
					      - echo "  return axios" >> custom-script.js
 | 
				
			||||||
      - echo "    .get(\`https://api.github.com/repos/\${repoOwner}/\${repoName}/releases/latest\`)" >> custom-script.js
 | 
					      - echo "    .get('https://api.github.com/repos/insignia-live/setup-assistant-release/releases/latest')" >> custom-script.js
 | 
				
			||||||
      - echo "    .then((response) => response.data.tag_name)" >> custom-script.js
 | 
					      - echo "    .then((response) => response.data.tag_name)" >> custom-script.js
 | 
				
			||||||
      - echo "    .catch((error) => {" >> custom-script.js
 | 
					      - echo "    .catch((error) => {" >> custom-script.js
 | 
				
			||||||
      - echo "      console.error('Error fetching latest release tag:', error.message);" >> custom-script.js
 | 
					      - echo "      console.error('Error fetching latest release tag:', error.message);" >> custom-script.js
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user